Subject: Auto generate?
Posted By: nikryden Post Date: 12/12/2005 9:02:27 AM
I am working on a project that I first must check what provider and auto generate a connection string for that provider and then get the tables in the database, mutch like Server explorer do. I have search internet, bought this book but i haven't found any solution yet.

*By using MSDASC.DataLinks I can get the connection string but can not see Database name or if it's ODBC, Oledb, sql.... I have tried to use the connection string i get this way but it have never worked.
* Most of the time it will use DSN to connect but not always.
* I have to se what type of server it is (ACUODBC,Microcraft Data,MSSql,...)
* I can get the tables in a database if it is oledb by using schema Guide, but this do not work with Odbc(not for me anyway).

I need someone to point me in the right direction, witch book to buy, site to visit or show me some god examples.

If server explorer can do it why can't I

Niklas

Reply By: Thearon Reply Date: 12/13/2005 7:04:20 AM
Niklas,

OleDb should be the provider that you use if you are not sure what type of database that you will be connecting to. What you want to do is not for the novice programmer and requires an understanding of how the different databases work as well as network programming.

VB 2005 has some excellent examples on automatically discovering what type of database the user is trying to connect to and will allow you to choose and use the appropriate drivers.

Go to http://msdn.microsoft.com/vstudio/ and read some of the articles there. There's also a menu option for sample code that might provide the information that you are looking for.

Thearon
Reply By: nikryden Reply Date: 12/19/2005 11:43:31 AM
Thanks Thearon!

The link helped me!



Go to topic 37665

Return to index page 414
Return to index page 413
Return to index page 412
Return to index page 411
Return to index page 410
Return to index page 409
Return to index page 408
Return to index page 407
Return to index page 406
Return to index page 405