Reading microsoft access database records

alexkiddie

New member
Joined
Oct 11, 2004
Messages
1
Programming Experience
Beginner
How do I read all records in a specific table and then populate the results in a list box?

e.g when a user types a value in a text box it must match a value in the table. When the user clicks on the find button it must retrieve the data and then post to list box?
 
try something like this



Try
Dim _SQL As String
_SQL = "SELECT Codigo, Actor FROM T10_Actores ORDER BY ACTOR"
... connect DB and retreive rows to a DATASET width the name _SQLDataSet and a table "_Lista"
_ListBox.DataSource = _SQLDataSet.Tables("_Lista")
_ListBox.ValueMember = "Codigo"
_ListBox.DisplayMember = "Actor"
Catch e As Exception
Finally
End Try
 
Back
Top