Simple SQL Query In VB.Net

  • Thread starter Thread starter avissoft
  • Start date Start date
A

avissoft

Guest
Hello!

I am complete noob to VB.Net !! I am trying to use MS Access Database and trying to make a simple SQL Query in VB.Net!!

Can anyone tell me on how to go about ?

Thanks!
 
Hi Anis!

Actually i wanted to know how to access database first..then run a sql query on it in VB.Net..!!

I think accessing a database is whole different than VB6...

Thanks!
 
I assume you mean you wish to use ADO.Net to connect to an Access database. You have to be specific as the old ado is still available by reference in .Net, its just not the better option anymore.
Using ADO.Net you have to decide what kind of return data you want. For a read only return you would use the OleDataReader. For a completely updatable disconnected representation of a Sql return you use a Dataset or DataTable through an OleDataAdapter. Beyond this you would be well advised to look for tutorials on these objects or ADO.Net as to outline their use here would take several pages.
 
Hi TIC!

I just want to read data from the access database..and display the results in msflexgrid!!! For now i just want to do this!!

Later i want to add new records...modify records and delete records..!!

Thanks!!
 
Back
Top