473,748 Members | 7,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Large DropDown Scrolling List

Hi There

We have dropdown on ASP page. The problem is we have about 900 items in the
dropdown. Users scrolling through the list have become very frustrated in
the past.

Can someone suggest if there is another way of implement a dropdown where
the datalist is as big as ours.

I am looking for something like a listbox in VB where you can start typing
the characters and the databelow moves accordingly until you have found what
you want.

Is there anything in ASP/HTML to achieve a similar functionality

thanks


Jul 19 '05 #1
10 5251
J P Singh wrote:
Hi There

We have dropdown on ASP page. The problem is we have about 900 items
in the dropdown. Users scrolling through the list have become very
frustrated in the past.

Can someone suggest if there is another way of implement a dropdown
where the datalist is as big as ours.

I am looking for something like a listbox in VB where you can start
typing the characters and the databelow moves accordingly until you
have found what you want.

Is there anything in ASP/HTML to achieve a similar functionality

You can do this in client-side code. Go to
http://www.thrasherwebdesign.com/ind...s&hp=links.asp and
download my dynamic listbox demo to see one way of doing it. A Google search
should find you other examples.
http://www.learnasp.com/learn/listdynamicmore.asp

Bob Barrows
Jul 19 '05 #2
J P Singh wrote on 19 sep 2003 in
microsoft.publi c.inetserver.as p.general:
We have dropdown on ASP page. The problem is we have about 900 items
in the dropdown. Users scrolling through the list have become very
frustrated in the past.

Can someone suggest if there is another way of implement a dropdown
where the datalist is as big as ours.

I am looking for something like a listbox in VB where you can start
typing the characters and the databelow moves accordingly until you
have found what you want.

Is there anything in ASP/HTML to achieve a similar functionality


Serverside coding cannot help you here so better ask a clientside
[javascript?] ng.

ASP functionality would make a roundtrip to the server on every keypress.

Clientside VBS only helps the IE users, btw.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3
Hello to Bob Barrows,

I went and tried out your ListDemo asp. My proficiency
in asp/vbscript/xml is kind of meager. I got an error
message with your script. I type in server name, ID,
pwrd, and one or two letters to list on and error out. I
placed a bunch of msgbox statements to debug. I can get
between the "1st if" and "2nd If" in sub txtCrit_onkeyup
in your clientside script below. Error message says:

"errorCode = -1072896759
reason=Required white space was missing.

Line =2
linepos = 55
filepos = 56
srcText = <!DOCTYPE HTML PUBLIC "-//WC3//DTD HTML 3.2
Final//EN">"

Is this error in the DTD? Here is your script. It would
be real cool if I could get it to work on my system.

<%@ Language=VBScri pt %>
<%Response.Buff er=true%>

<HTML>
<HEAD>
<META name="VI60_Defa ultClientScript " Content="VBScri pt">

<META NAME="GENERATOR " Content="Micros oft Visual Studio
6.0">
<SCRIPT ID=clientEventH andlersVBS LANGUAGE=vbscri pt>
<!--
dim sCurCrit
dim xmldoc
Sub window_onload
dim f
sUser = txtUser
sPwd = txtPwd
sServer = txtServer
if screen.availWid th > 800 then
tblMain.style.f ontSize="10pt"
end if
lstTitles.style .visibility="vi sible"
set xmldoc = nothing
End Sub

Sub txtCrit_onkeyup
dim sOptions, sKey, sCrit, oOption, oNodes,xmlFilt,
oNode,iCritLeng th

msgbox "entering txtCrit" 'my first error trap

'I have this set to retrieve data when there's a single
character entered.
'With 6000 rows, you may want to increase this to two
characters

sCrit=txtCrit.v alue
ClearList
sKey = chr(window.even t.keyCode)

msgbox "1st if and len of sCrit is " & len(sCrit) & "
and sKey is " & sKey 'my second error trap

if len(sCrit) > 1 then 'change to 2 for 6000 rows
'check to see if someone hit 2 letters so close
together that the elseif code
'never had a chance to execute and create xmlDoc

msgbox "2nd if" 'third error trap
if not xmlDoc is nothing then
set xmlFilt = CreateObject("M icrosoft.XMLDOM ")
'The following can be replaced by an xslt
transformation if you are so inclined
set xmlFilt.documen telement = xmlFilt.createe lement
("rows")
iCritLength = len(sCrit)
for each oNode in xmldoc.document element.childno des
if left(oNode.geta ttribute
("customerid"), iCritLength) = ucase(sCrit) then
xmlFilt.documen telement.append child
oNode.Clonenode (false)
end if
next
msgbox "xmlFilt"
fillList xmlFilt
set xmlFilt = nothing
else
sCurCrit = sCrit
set xmldoc = CreateObject("M icrosoft.XMLDOM ")
if RetrieveData(sC urCrit,xmldoc) then
msgbox "xmldoc1"
fillList(xmldoc )
end if
end if
elseif len(sCrit) > 0 then 'change to 1 for 6000 rows
if sCrit <> sCurCrit then
sCurCrit = sCrit
if RetrieveData(sC urCrit,xmldoc) then
msgbox "xmldoc2"
fillList(xmldoc )
end if
else
msgbox "xmldoc3"
fillList xmldoc
end if
end if
End Sub
-->
</SCRIPT>
<SCRIPT LANGUAGE=vbscri pt>
<!--
Sub ClearList
lstTitles.inner HTML=""
End Sub

Sub fillList(pxmlDo c)
'you could have used a data island and bound the
listbox to it, but
'I chose to do it this way
dim oNode
for each oNode in pxmlDoc.documen telement.childn odes
set oOption = document.create Element("OPTION ")
oOption.value = oNode.GetAttrib ute("orderid")
oOption.text = oNode.GetAttrib ute("customerid ") & _
" - " & oNode.GetAttrib ute("orderid")
lstTitles.optio ns.add oOption
next
end sub

Function RetrieveData(ps Crit, pxmlDoc)
dim oHTTP,xPE,bStat us, sUrl
RetrieveData = true
set oHTTP = CreateObject("M icrosoft.XMLHTT P")
set pxmlDoc = CreateObject("M icrosoft.XMLDOM ")
sUrl = "ListDemo_serve r.asp?P1=" & pscrit & "&User=" &
txtUser.value & _
"&Server=" & txtServer.value & "&PWD=" & txtPwd.value

oHTTP.open "GET",sUrl, false
oHTTP.send
bStatus= pxmlDoc.loadXML (oHTTP.response text )
if bStatus = false then
Set xPE = pxmlDoc.parseEr ror
strMessage = "errorCode = " & xPE.errorCode & vbCrLf
strMessage = strMessage & "reason = " & xPE.reason &
vbCrLf
strMessage = strMessage & "Line = " & xPE.Line &
vbCrLf
strMessage = strMessage & "linepos = " & xPE.linepos &
vbCrLf
strMessage = strMessage & "filepos = " & xPE.filepos &
vbCrLf
strMessage = strMessage & "srcText = " & xPE.srcText &
vbCrLf
set xPE = nothing
MsgBox strMessage,,"Re trieving Data"
RetrieveData=fa lse
end if
set oHTTP = nothing
end function
-->
</SCRIPT>
</HEAD>
<BODY bgColor=lightgr ey topMargin=2 leftMargin=2>
<DIV id=elHeading><S TRONG><FONT color=blue face=Verdana
size=3
style="BORDER-TOP-WIDTH: thin">
Orders Maintenance </FONT></STRONG></DIV>
<P>
<TABLE id=tblMain cellSpacing=1 cellPadding=1 width="75%"
border=1>
<CAPTION>This demo uses the Orders table in the Northwind
database</CAPTION>
<TR>
<TD>SQL Server Name: <INPUT id=txtServer></TD>
<TD> User Name <INPUT id=txtUser></TD>
<TD> Password <INPUT id=txtPwd></TD>
<TR>
<TD>Enter the first few letters of the last name of
the customer id whose data
you wish to view or edit:<BR><INPUT id=txtCrit
name=text1></TD>
<TD colspan=2><SELE CT id=lstTitles style="VISIBILI TY:
hidden; WIDTH: 252px"
size=8></SELECT>
</TD>
</TR>
</TABLE></P>
</BODY>
</HTML>

Thanks for sharing your script.
Rich
-----Original Message-----
J P Singh wrote:
Hi There

We have dropdown on ASP page. The problem is we have about 900 items in the dropdown. Users scrolling through the list have become very frustrated in the past.

Can someone suggest if there is another way of implement a dropdown where the datalist is as big as ours.

I am looking for something like a listbox in VB where you can start typing the characters and the databelow moves accordingly until you have found what you want.

Is there anything in ASP/HTML to achieve a similar functionalityYou can do this in client-side code. Go to
http://www.thrasherwebdesign.com/index.asp?

pi=links&hp=lin ks.asp anddownload my dynamic listbox demo to see one way of doing it. A Google searchshould find you other examples.
http://www.learnasp.com/learn/listdynamicmore.asp

Bob Barrows
.

Jul 19 '05 #4
The only way I was able to reproduce your error was by deliberately
imputting some faulty connection data, that caused the connection to SQL
Server to fail. In a real application, I would have put in some
error-handling to take care of this, but since this was a quick demo, I did
not bother.

Where the error-handling has to take place is in the listdemo_server .asp
page <I've snipped some stuff>:

Response.Buffer =true
Response.Conten tType="text/xml"
Response.Expire s = 0

Dim cnSQL, sConnect
'>>>>
Dim sError

dim sUser,sPwd,sSer ver,sCriteria

sUser = Request.QuerySt ring("User")
sPwd = Request.QuerySt ring("PWD")
sServer = Request.QuerySt ring("Server")
sConnect = "Provider=SQLOL EDB.1;Password= " & sPwd & ";Persist Security
Info=False;User ID=" & sUser & " ;Initial Catalog=Northwi nd;Data Source=" &
sServer & ";Applicati on Name=ListDemo"
sCriteria = Request.QuerySt ring("P1")
if len(sCriteria) = 0 then sCriteria= "TR"
set cnSQL = server.CreateOb ject("ADODB.Con nection")
cnSQL.Connectio nString=sConnec t
'>>>>here
On Error Resume Next
cnSQL.Open
if err <> 0 then
sError="<error msg=""Connectio n to SQL Server failed."" errdesc=""" & _
Err.Description & """ connectstring=" "" & sConnect & _
""" />"
Response.Write sError
Response.end
end if
On Error GoTo 0

Then, in the RetrieveData function, after the bStatus if statement:

set oErrNode = nothing
set oErrNode = pxmlDoc.selects inglenode("/error")
if not oErrNode is nothing then
RetrieveData = false
MsgBox oErrNode.getatt ribute("msg") & vbCrLf & _
oErrNode.getatt ribute("errdesc ") & _
vbCrLf & _
"The connection string was: " & _
vbCrLf & _
oErrNode.getatt ribute("connect string")
end if
set oErrNode = nothing
And in the txtCrit_onkeyup sub, there are two places where Retrievedata is
called. You should make them look like this:
if RetrieveData(sC urCrit,xmldoc) then
fillList(xmldoc )
else
txtCrit.value = ""
sCurCrit = ""
txtServer.focus
end if

HTH,
Bob Barrows


Rich wrote:
Hello to Bob Barrows,

I went and tried out your ListDemo asp. My proficiency
in asp/vbscript/xml is kind of meager. I got an error
message with your script. I type in server name, ID,
pwrd, and one or two letters to list on and error out. I
placed a bunch of msgbox statements to debug. I can get
between the "1st if" and "2nd If" in sub txtCrit_onkeyup
in your clientside script below. Error message says:

"errorCode = -1072896759
reason=Required white space was missing.

Line =2
linepos = 55
filepos = 56
srcText = <!DOCTYPE HTML PUBLIC "-//WC3//DTD HTML 3.2
Final//EN">"

Is this error in the DTD? Here is your script. It would
be real cool if I could get it to work on my system.

<%@ Language=VBScri pt %>
<%Response.Buff er=true%>

<HTML>
<HEAD>
<META name="VI60_Defa ultClientScript " Content="VBScri pt">

<META NAME="GENERATOR " Content="Micros oft Visual Studio
6.0">
<SCRIPT ID=clientEventH andlersVBS LANGUAGE=vbscri pt>
<!--
dim sCurCrit
dim xmldoc
Sub window_onload
dim f
sUser = txtUser
sPwd = txtPwd
sServer = txtServer
if screen.availWid th > 800 then
tblMain.style.f ontSize="10pt"
end if
lstTitles.style .visibility="vi sible"
set xmldoc = nothing
End Sub

Sub txtCrit_onkeyup
dim sOptions, sKey, sCrit, oOption, oNodes,xmlFilt,
oNode,iCritLeng th

msgbox "entering txtCrit" 'my first error trap

'I have this set to retrieve data when there's a single
character entered.
'With 6000 rows, you may want to increase this to two
characters

sCrit=txtCrit.v alue
ClearList
sKey = chr(window.even t.keyCode)

msgbox "1st if and len of sCrit is " & len(sCrit) & "
and sKey is " & sKey 'my second error trap

if len(sCrit) > 1 then 'change to 2 for 6000 rows
'check to see if someone hit 2 letters so close
together that the elseif code
'never had a chance to execute and create xmlDoc

msgbox "2nd if" 'third error trap
if not xmlDoc is nothing then
set xmlFilt = CreateObject("M icrosoft.XMLDOM ")
'The following can be replaced by an xslt
transformation if you are so inclined
set xmlFilt.documen telement = xmlFilt.createe lement
("rows")
iCritLength = len(sCrit)
for each oNode in xmldoc.document element.childno des
if left(oNode.geta ttribute
("customerid"), iCritLength) = ucase(sCrit) then
xmlFilt.documen telement.append child
oNode.Clonenode (false)
end if
next
msgbox "xmlFilt"
fillList xmlFilt
set xmlFilt = nothing
else
sCurCrit = sCrit
set xmldoc = CreateObject("M icrosoft.XMLDOM ")
if RetrieveData(sC urCrit,xmldoc) then
msgbox "xmldoc1"
fillList(xmldoc )
end if
end if
elseif len(sCrit) > 0 then 'change to 1 for 6000 rows
if sCrit <> sCurCrit then
sCurCrit = sCrit
if RetrieveData(sC urCrit,xmldoc) then
msgbox "xmldoc2"
fillList(xmldoc )
end if
else
msgbox "xmldoc3"
fillList xmldoc
end if
end if
End Sub
-->
</SCRIPT>
<SCRIPT LANGUAGE=vbscri pt>
<!--
Sub ClearList
lstTitles.inner HTML=""
End Sub

Sub fillList(pxmlDo c)
'you could have used a data island and bound the
listbox to it, but
'I chose to do it this way
dim oNode
for each oNode in pxmlDoc.documen telement.childn odes
set oOption = document.create Element("OPTION ")
oOption.value = oNode.GetAttrib ute("orderid")
oOption.text = oNode.GetAttrib ute("customerid ") & _
" - " & oNode.GetAttrib ute("orderid")
lstTitles.optio ns.add oOption
next
end sub

Function RetrieveData(ps Crit, pxmlDoc)
dim oHTTP,xPE,bStat us, sUrl
RetrieveData = true
set oHTTP = CreateObject("M icrosoft.XMLHTT P")
set pxmlDoc = CreateObject("M icrosoft.XMLDOM ")
sUrl = "ListDemo_serve r.asp?P1=" & pscrit & "&User=" &
txtUser.value & _
"&Server=" & txtServer.value & "&PWD=" & txtPwd.value

oHTTP.open "GET",sUrl, false
oHTTP.send
bStatus= pxmlDoc.loadXML (oHTTP.response text )
if bStatus = false then
Set xPE = pxmlDoc.parseEr ror
strMessage = "errorCode = " & xPE.errorCode & vbCrLf
strMessage = strMessage & "reason = " & xPE.reason &
vbCrLf
strMessage = strMessage & "Line = " & xPE.Line &
vbCrLf
strMessage = strMessage & "linepos = " & xPE.linepos &
vbCrLf
strMessage = strMessage & "filepos = " & xPE.filepos &
vbCrLf
strMessage = strMessage & "srcText = " & xPE.srcText &
vbCrLf
set xPE = nothing
MsgBox strMessage,,"Re trieving Data"
RetrieveData=fa lse
end if
set oHTTP = nothing
end function
-->
</SCRIPT>
</HEAD>
<BODY bgColor=lightgr ey topMargin=2 leftMargin=2>
<DIV id=elHeading><S TRONG><FONT color=blue face=Verdana
size=3
style="BORDER-TOP-WIDTH: thin">
Orders Maintenance </FONT></STRONG></DIV>
<P>
<TABLE id=tblMain cellSpacing=1 cellPadding=1 width="75%"
border=1>
<CAPTION>This demo uses the Orders table in the Northwind
database</CAPTION>
<TR>
<TD>SQL Server Name: <INPUT id=txtServer></TD>
<TD> User Name <INPUT id=txtUser></TD>
<TD> Password <INPUT id=txtPwd></TD>
<TR>
<TD>Enter the first few letters of the last name of
the customer id whose data
you wish to view or edit:<BR><INPUT id=txtCrit
name=text1></TD>
<TD colspan=2><SELE CT id=lstTitles style="VISIBILI TY:
hidden; WIDTH: 252px"
size=8></SELECT>
</TD>
</TR>
</TABLE></P>
</BODY>
</HTML>

Thanks for sharing your script.
Rich

Jul 19 '05 #5
Thanks for responding to my question about your listdemo (thanks for
sharing that code). I will try to implement your error handling on
Monday (don't have the server available to me at home). I will respond
back with the results.

Thanks,

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #6
I made the changes per your suggestions in listdemo_server .asp and
listdemo_client .asp. I don't error out now, and I make it all the way
to Sub fillList(pxmlDo c). But I never make it inside the for loop in
txtCrit_onkeyup or the forloop in fillList. Note: using IE6.0.2800

'*******begin code snipet
Sub txtCrit_onkeyup
...
if not xmlDoc is nothing then
set xmlFilt = CreateObject("M icrosoft.XMLDOM ")
'The following can be replaced by an xslt
'transformation if you are so inclined
set xmlFilt.documen telement = xmlFilt.createe lement("rows")
iCritLength = len(sCrit)

'***begin for loop

for each oNode in xmldoc.document element.childno des
if left(oNode.geta ttribute("custo merid"),iCritLe ngth) = ucase(sCrit)
then
xmlFilt.documen telement.append child oNode.Clonenode (false)
end if
msgbox "inside oNode for loop" 'just checking if I'm in
next 'for loop - nope!

'***out of for loop

fillList xmlFilt 'xmlFilt has nothing
set xmlFilt = nothing
else
sCurCrit = sCrit

'********end of code snipet

I enter this data on the clientside page:

SqlSrvName cnfrkccmc001
username SA
Password ""
Enter first fiew letters... vi for customer Id vinet.

Do I need to configure anything on IE? I thank you for trying to help
me make your app work on my system. I have made a little progress, just
not quite there. It just seems like a real cool piece of coding.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #7
I can't troubleshoot this on your machine from here. I've never seen this
code fail so I have no idea what could be going wrong.

There has to be a reason it's not getting into the For loop. You should try
displaying the xmldoc's xml using:

msgbox xmldoc.xml

to make sure it contains some data.
Bob Barrows

Rich P wrote:
I made the changes per your suggestions in listdemo_server .asp and
listdemo_client .asp. I don't error out now, and I make it all the way
to Sub fillList(pxmlDo c). But I never make it inside the for loop in
txtCrit_onkeyup or the forloop in fillList. Note: using IE6.0.2800

'*******begin code snipet
Sub txtCrit_onkeyup
..
if not xmlDoc is nothing then
set xmlFilt = CreateObject("M icrosoft.XMLDOM ")
'The following can be replaced by an xslt
'transformation if you are so inclined
set xmlFilt.documen telement = xmlFilt.createe lement("rows")
iCritLength = len(sCrit)

'***begin for loop

for each oNode in xmldoc.document element.childno des
if left(oNode.geta ttribute("custo merid"),iCritLe ngth) = ucase(sCrit)
then
xmlFilt.documen telement.append child oNode.Clonenode (false)
end if
msgbox "inside oNode for loop" 'just checking if I'm in
next 'for loop - nope!

'***out of for loop

fillList xmlFilt 'xmlFilt has nothing
set xmlFilt = nothing
else
sCurCrit = sCrit

'********end of code snipet

I enter this data on the clientside page:

SqlSrvName cnfrkccmc001
username SA
Password ""
Enter first fiew letters... vi for customer Id vinet.

Do I need to configure anything on IE? I thank you for trying to help
me make your app work on my system. I have made a little progress,
just not quite there. It just seems like a real cool piece of coding.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #8
msgbox xmldoc.xml returns null. I planted one in Retreive Data, in
txtCrit_onKeyup , fillList. All empty

I was looking at the server side code after I posted my last post and
noticed that you appear to be setting some default password if
len(sPwrd)=0. So I commented that out, and then I got the original
error message again, but now I have some more detail on that.

'***********ser ver side snipet

sUser = Request.QuerySt ring("User")
if len(sUser) = 0 then sUser = "vbact"
sPwd = Request.QuerySt ring("PWD")
'if len(sPwd) = 0 then sPwd="tcabv"
sServer = Request.QuerySt ring("Server")
if len(sServer) = 0 then sServer = "CLNSQLDEV7 "
sConnect = "Provider=SQLOL EDB.1;Password= " & sPwd & ";Persist Security
Info=False;User ID=" & sUser & " ;Initial Catalog=Northwi nd;Data
Source=" & sServer & ";Applicati on Name=ListDemo"
sCriteria = Request.QuerySt ring("P1")
if len(sCriteria) = 0 then sCriteria= "TR"

'**********end serverside snipet

The error is occuring at
'************** *************** *
Function RetrieveData(ps Crit, pxmlDoc)
...
strMessage = "errorCode = " & xPE.errorCode & vbCrLf
...
set xPE = nothing
MsgBox strMessage,,"Re trieving Data"
msgbox "after strMessage" '<-----my message box
'<---I get to this one
'************** *************** *************** ****

I fiddled with sPwrd on the server side. If len(sPwrd)>0 then I get an
error message that the SqlSrv connection failed. I have Northwind set to
SA and no password. If I comment out the 'If len(sPwrd) = 0 part then I
get the original error message that I am missing some white space ...
That error occurs in Retrieve Data function. Well, I added an account
to Northwind user shmo, pwrd shmo. Still getting the original error. I
also slapped together a quicky asp to list customerID from Orders to see
if I connect OK to SqlSrv/Northwind. Yeah, worked fine. Here is the
connection string I used in my asp:

oConn.Open("Pro vider=SQLOLEDB; Data Source=cnFRKccm c001;Initial
Catalog=Northwi nd;UID=SA;PWD=; ");

I tried substituting that in your server side code. Did not make a
difference. Still get same error. Also tried shmo, shmo. same deal.

Yeah, so for me it is always some data entry person that has some
configuration or has entered some combination of data that I have not
accounted for which causes an error. Sorry bout that.

Hope I gave you enough info to see what my problem is without having to
physically be here. Did I mention I am also inside a firewall on a
local intranet, would that make a difference?

I never thought about it, but I am in the same boat of JP (original
poster) where I create a static list from a loop and populate a list
box.

I can't troubleshoot this on your machine from here. I've never seen
this
code fail so I have no idea what could be going wrong.

There has to be a reason it's not getting into the For loop. You should
try
displaying the xmldoc's xml using:

msgbox xmldoc.xml

to make sure it contains some data.

Bob Barrows
<<
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #9
1. It's a bad idea not to assign a password to the SA account. This is how
the Code Red worm was able to spread. Always assign a password for SA, no
matter where the SQL Server or MSDE is installed.

2. Looking at this statement:
oConn.Open("Pro vider=SQLOLEDB; Data Source=cnFRKccm c001;Initial
Catalog=Northwi nd;UID=SA;PWD=; ");
This looks like a jscript statement. It should look like this in vbscript:
oConn.Open "Provider=SQLOL EDB;Data Source=cnFRKccm c001;" & _
"Initial Catalog=Northwi nd;UID=SA;PWD="

Again, you should assign a password to SA.

HTH,
Bob Barrows
Rich P wrote: msgbox xmldoc.xml returns null. I planted one in Retreive Data, in
txtCrit_onKeyup , fillList. All empty

I was looking at the server side code after I posted my last post and
noticed that you appear to be setting some default password if
len(sPwrd)=0. So I commented that out, and then I got the original
error message again, but now I have some more detail on that.

'***********ser ver side snipet

sUser = Request.QuerySt ring("User")
if len(sUser) = 0 then sUser = "vbact"
sPwd = Request.QuerySt ring("PWD")
'if len(sPwd) = 0 then sPwd="tcabv"
sServer = Request.QuerySt ring("Server")
if len(sServer) = 0 then sServer = "CLNSQLDEV7 "
sConnect = "Provider=SQLOL EDB.1;Password= " & sPwd & ";Persist Security
Info=False;User ID=" & sUser & " ;Initial Catalog=Northwi nd;Data
Source=" & sServer & ";Applicati on Name=ListDemo"
sCriteria = Request.QuerySt ring("P1")
if len(sCriteria) = 0 then sCriteria= "TR"

'**********end serverside snipet

The error is occuring at
'************** *************** *
Function RetrieveData(ps Crit, pxmlDoc)
..
strMessage = "errorCode = " & xPE.errorCode & vbCrLf
..
set xPE = nothing
MsgBox strMessage,,"Re trieving Data"
msgbox "after strMessage" '<-----my message box
'<---I get to this one
'************** *************** *************** ****

I fiddled with sPwrd on the server side. If len(sPwrd)>0 then I get
an error message that the SqlSrv connection failed. I have Northwind
set to SA and no password. If I comment out the 'If len(sPwrd) = 0
part then I get the original error message that I am missing some
white space ... That error occurs in Retrieve Data function. Well, I
added an account to Northwind user shmo, pwrd shmo. Still getting
the original error. I also slapped together a quicky asp to list
customerID from Orders to see if I connect OK to SqlSrv/Northwind.
Yeah, worked fine. Here is the connection string I used in my asp:

oConn.Open("Pro vider=SQLOLEDB; Data Source=cnFRKccm c001;Initial
Catalog=Northwi nd;UID=SA;PWD=; ");

I tried substituting that in your server side code. Did not make a
difference. Still get same error. Also tried shmo, shmo. same deal.

Yeah, so for me it is always some data entry person that has some
configuration or has entered some combination of data that I have not
accounted for which causes an error. Sorry bout that.

Hope I gave you enough info to see what my problem is without having
to physically be here. Did I mention I am also inside a firewall on a
local intranet, would that make a difference?

I never thought about it, but I am in the same boat of JP (original
poster) where I create a static list from a loop and populate a list
box.

I can't troubleshoot this on your machine from here. I've never seen
this
code fail so I have no idea what could be going wrong.

There has to be a reason it's not getting into the For loop. You
should try
displaying the xmldoc's xml using:

msgbox xmldoc.xml

to make sure it contains some data.

Bob Barrows
<<
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
7366
by: Rey | last post by:
Howdy, all. Appreciate your help. Have a one to many relation between a client and visit table. In the visit subform, I have a visittype and counselor field which are comboboxes. If I set either field to drop down via Me.dropdown in the GotFocus event for the field, each time the client record changes the visittype or counselor field drops down - only have the GotFocus event set to one combobox at the moment - unless I move the cursor...
0
1753
by: george d lake | last post by:
Hi, Is there a way to have a "Auto Complete" textbox or a "editable" dropdown? Here is my problem. I have a screen that need to have a list of 800+ employees. To be a dropdown, that could be a lot of scrolling. and to enter the name in a textbox leaves too many possible typos. So, is there a control that will do a auto complete in the textbox as I type the name or have a combo box that I could type and auto complete like in VB?
1
3333
by: nicholas | last post by:
Hi, If on an asp.net page the user has just selected a value in a dropdownlist and scrolls with the wheel of his mouse, the selected value of the dropdownlist will change. How could I avoid this. So how could I disable the mouse scrolling that dropdownlist. Or how could I disable the mouse-scroll on those pages.
3
11138
by: Paul W | last post by:
Hi - I'm developing a 'front-desk' app. to be used over the internet. (SQL-Server back-end). One of the pages will require the user to select an entry from a large (~4000) list of 'member names'. What are the options to reduce the bandwidth load of this? Is there any way that I can cache the list on the client (and allow them to periodically 'refresh' their local copy?). Or, does anyone have some code for a 'manual' auto-select option...
5
2538
by: Kassad | last post by:
Two questions: 1. There is a dropdown box that has a whole bunch of values but it is not linked to a recordsource. I believe when this object was created the values were manually enterred but I have looked all over and cannot find the list of values to edit. 2 I created a 1 column table to use as my drop down box and it works fine except when I am hitting tab through the form I would like the first row value to be highlighted when I tab...
20
1685
by: Lit | last post by:
Hello, I need to create an Internet based, asp.net webform where a user can select multiple cities in a state. as you know the number of cities in a state can be very large. What is the best way of designing such thing. I need to give the user the best experience possible
2
1776
by: ARC | last post by:
I'm testing a user's db that contains a very large number of records. I have an invoice screen, with an invoice select dropdown box that shows all invoices, and the customer's name, etc. With 80,000+ invoices in this particular db, clicking the dropdown is painfully slow accross a network only (I'm testing on a wireless, so it's even slower still). All fields are properly indexed, such as the invoice number (sort descending), etc. I've...
3
1017
by: arial | last post by:
Hi all, Here I need a help from you experts again. I have drop down list in my asp.net web form. My drop down list is pretty good size big and now users are complainning about scrolling down to the item they want to select. They are requesting to allow them to type in my than a one character so that they can get the item faster rather than scrolling down for example, looking for name Ryan O'Neil they have to scroll down all R's. Is...
4
4586
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet reservation of available resources (laptops, beamers, etc). The MySql database queries are already in place, as is the ASP administration panel. The frontend that users will see however, still needs some work. I'm really close, but since I'm no...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9325
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.