|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Listing databasesI'm building a database export program where I want to allow the user to
choose a connection type (ODBC,OLEDB, or SQL), enter a connection string, and then export the schema and a number of rows of data. I need to fill a listbox with database names which the user id has read access. How would I go about getting the list of databases from a database server such as SQL, Pervasive, Oracle, etc? Is there a generic method that works regardless of database provider? *** Sent via Developersdex http://www.developersdex.com *** Terry Olsen <tolse***@hotmail.com> wrote in news:u80xCqUKHHA.1280
@TK2MSFTNGP04.phx.gbl: > Is there a generic method I don't think so ... you'll have to query each database type manually.> that works regardless of database provider? >
Show quote
Hide quote
"Terry Olsen" <tolse***@hotmail.com> wrote in message I wrote a database definition program awhile back that lists databases from news:u80xCqUKHHA.1280@TK2MSFTNGP04.phx.gbl... > I'm building a database export program where I want to allow the user to > choose a connection type (ODBC,OLEDB, or SQL), enter a connection > string, and then export the schema and a number of rows of data. > > I need to fill a listbox with database names which the user id has read > access. > > How would I go about getting the list of databases from a database > server such as SQL, Pervasive, Oracle, etc? Is there a generic method > that works regardless of database provider? > > > > *** Sent via Developersdex http://www.developersdex.com *** a server, then lists tables/column info and allows printing of the database structure(s). What I did was created an interface (IDatabaseInfo for example) and had methods called GetDatabases, GetTables, GetColumns, etc. Then, for each DBMS it supported, all we had to do was create a class that implemented the interface (SqlDatabaseInfo, AccessDatabaseInfo). Makes things easier...and all you have to do is pass the class instance as the interface around and call those methods :) HTH, Mythran
VB.Net Timer Issue
Problem With DoEvents ADO.NET Problem write or wrong Using different references based on "build" Launching Web site for help Cross: Access speed Small question? Is it necessary to close a local OleDbDataReader before exit function? VB Smart Devivce Programming Changing user interface |
|||||||||||||||||||||||