|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
vb script additem doesnt seem to work on a list box
All.
I am quite new to this so bear with me.... I am writing a function to populate a list box. I am using client side vb script in a web page. After my sql query i know the data in the recordset is correct but when i try to add to the list box nothing happens (no errors no data). The code looks like this (ignore the message box that was just a test): Function getPropForSelectedTask() On error resume next Set Rs1=CreateObject("ADODB.Recordset") Source = "select Name from Property where ltask = '6'" Connect = "Encryption for data=true;Integrated Security=SSPI;server=localhost;Provider=sqloledb;I nitial catalog=TimeTracker;user ID=sa;password=;" Rs1.Open Source, Connect varArray = Rs1.GetRows() For i=0 To UBound(varArray, 2) MsgBox(varArray(0, i)) SelectedList.AddItem varArray(0, i) Next Rs1.Close End Function i would expect the fourth from last line to populate a list box called SelectedList.... please help. |
|
#2
|
|||
|
|||
|
This would be better in the asp forum
Take out the on error resume next, maybe you'll see a code error.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > vb script additem doesnt seem to work on a list box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|