Accessing the oledb library
Hi!
I Want in my vb.net apps .NEt 2005. to accessing the oledb library. What I mean is that I am buildning a program thar can read multiple db types an connection an list all tabels ect. But first I have to solve the problem so I can use the OLEDB providers and get the connectionsstring. I hope you are following me.
I also would like to access the ODBC library in window trough my apps, so if you can help me on this. I would be greateful
/Tyronne
Re: Accessing the oledb library
the 2 namespaces you want to read about are
System.Data.OleDb()
System.Data.Odbc()
they are VERY similar, except one is specific to OLE and one is specific to ODBC, but you will find many of their classes and methods are similar.
These namespaces are contained in the system.data.dll, which is added as a reference by default to any new VB.NET project you make in the IDE.
Re: Accessing the oledb library
Quote:
Originally Posted by tyson
Hi!
I Want in my vb.net apps .NEt 2005. to accessing the oledb library. What I mean is that I am buildning a program thar can read multiple db types an connection an list all tabels ect. But first I have to solve the problem so I can use the OLEDB providers and get the connectionsstring. I hope you are following me.
I also would like to access the ODBC library in window trough my apps, so if you can help me on this. I would be greateful
/Tyronne
You don't really need to access the OLEDB library for that. You just need to know how to use it for the different data types. Have a separate connection string for each, and based upon the choices made, to know what sort of a query to perform to list out all the tables in a specific database. In fact, the connection strings will be easy ( http://www.connectionstrings.com/ ) but the real work comes with finding a way to access the system/master database of each server to figure out what tables are in what databases.