|
-
Oct 22nd, 2003, 08:31 PM
#1
Thread Starter
New Member
ado and listboxes???
I am using vb6 and sql server 2000.
I am trying to put results from a query into a listbox when the form loads.
Here is my code:
I need to link the query results to listbox1.text???
Dim emplRS As New Adodb.Recordset
' sets the connection
Const connectStr = "Provider=SQLOLEDB.1;Data Source=MA0;database=ma00_app;uid=gsha;pwd=15;"
' set property to automatically create a connection
emplRS.ActiveConnection = connectStr
' open recordset with query for all records matching variable
emplRS.Open "select whsekey From timwarehouse where companyid = 'QCC' and whseid = '380'"
empirs.Close
my brain is not working, how do i link the query results to listbox1.text?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|