Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference between System.Data.Odbc and System.Data.OleDb

Status
Not open for further replies.

Miked811

Programmer
Apr 17, 2005
61
CA
Hi,

I'm new to VB.NET. I just want to know what is the difference between System.Data.Odbc and System.Data.OleDb? Which is the best Namespace to use when manipulating data in MS Acess or SQL Server? Its more of an Advantages and Disadvantages question?

Thanks a lot in advance

Mike
 
Hi,

First, have a look at to see a list of all the correct ways to establish a db connection.

If you use SQL Server then use the system.data.sqlclient classes.

For access, you can use the oledb. One of its (major?) cons is that you cannot use named parameters. It may be conflicting so i explain: You CAN have named params, but what actually matters is the order that you declare*
Maybe the odbc for access is better.

________________
* If you want more explain, ask; it's just that it is off-topic.
 
Thanks for the quick response. Ive have been searching the web for resources and I always see OleDbDataAdapter and DataSet to manipulate Data. Is DataAdapter needed regardless of what database I am using, may it be Access or SQL Server to manipulate data in a table.

Do you happend to have a sample code for a simple table that can Insert, Delete and Update Data so I can study it?

Just for example a Table design like:

Table Name: SomeTbl
Fields: ID, Name, Address

Thanks a lot,

Mike
 
Hi,

I found a nice site to help out those who are new to VB.NET and ADO.NET. It might not be much, but a good start. I just wanted to share it with you. I'm getting somewhere now and looking up to creating my first VB.NET App, converting my VB 6 apps (not just converting it but fully making it to VB.NET and ADO.NET).

Happy Programing...

Mike

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top