Query MS Access database in VB 2008

Posted by Logan on Stack Overflow See other posts from Stack Overflow or by Logan
Published on 2010-05-28T16:00:38Z Indexed on 2010/05/28 16:12 UTC
Read the original article Hit count: 145

Hi,

I added an Access database as a Data Source in VB 2008. I want to query this database and use the information in various ways throughout the program. For example, there is an Employee table with first/last names of employees. I have a combobox on my form that I want to display all of the employees. So I want to query the database for all the rows in the Employee table, and add them to the combobox as I go.

I am familiar with SQL Syntax, so I am not asking how to write the query itself, but rather how to fetch rows in VB code (mimicking php's mysql_fetch_assoc and mysql_connect essentially)

Thanks!

Edit: Also, I want to know if I can query a DB if I don't add it as a data source (if I know the path name of the database)

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about visual-studio-2008