•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 391,924 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,675 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 3173 | Replies: 6
![]() |
•
•
Join Date: Oct 2006
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 1
I am new to the whole concept of "data binding". What I am trying to do seems very simple, but I don't know where to start. I have a database with an ODBC System DSN and I can connect to it with an ADODB.Connection object. I can also create an ADODB.Recordset object and traverse/manipulate the records contained in it. What I am unable to do is bind a listbox to this recordset. I know I could simply create code to traverse both the listbox and the recordset to copy recordset data to the listbox and remove listbox entries that are not in the recordset, but this is not a trivial task. Clearing the listbox and repopulating is easy enough, but doing this will reset the selected list item every time, and this is unacceptable. Any suggestions?
By the way, I am using VB 6.0
By the way, I am using VB 6.0
•
•
Join Date: Jul 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Set Rs = Nothing
Rs.open " Select * From Table Where Cond ...",Con,adOpenStatic
if Rs.Recordcount > 0 then
rs.movefirst
do while not rs.eof
list1.Additem rs.fields("Field1")
rs.movenext
loop
end if Last edited by Tekmaven : 30 Days Ago at 2:29 pm. Reason: Code tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Similar Threads
- ADODB.Recordset (0x800A0E78):Operation is not allowed when the object is closed. (ASP)
- Delete from a listbox (Visual Basic 4 / 5 / 6)
- asp problem ADODB.Recordset error '800a0bb9' (ASP)
- SqlDataAdapter bind to a listbox (ASP.NET)
- Adodb=adodc??? (Visual Basic 4 / 5 / 6)
- problems with recordset accessing access (Visual Basic 4 / 5 / 6)
- Understanding ASP classes (ASP Tutorials)
- ADODB.Recordset error '800a0bb9' (ASP)
- "ADODB Recordset error" (ASP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Upload picture from file
- Next Thread: Need to separate 16 bit binary to 4bit and 12 bit binary values


Linear Mode