Schemas in ADO.Net 2.0

  • Thread starter Daniel Bello Urizarri
  • Start date
D

Daniel Bello Urizarri

Hello:

Im trying to build a generic library with tools that can be connected to any
database.

I want to list the tables on the database. Now I'm using the code:

DataTable resultTables = cs.GetSchema("Tables").

But it returns different tables for the different databases For example,
in SqlServer (TABLE_NAME, TABLE_TYPE, TABLE_CATALOG, TABLE_SCHEMA),
but in Oracle (TABLE_NAME, TYPE, OWNER).

I remember that in oledeb, schemas were uniform (take a look to
OleDbConnection.GetOleDbSchemaTable () methd. But it seems that in ADO.Net
2.0 they are not defined and any provider can return anything.

Is there in ADO.Net 2.0 any way to ask for some kind of more uniform
schemas?
The class System.Data.Common.SchemaTableColumn, What is it for?

Thanks.
 
K

Kalpesh

Hi,

I havent tried this
Though there is a method named 'GetOleDbSchemaTable' for
'OleDBConnection' class

BTW, what does cs.GetSchema("Tables") apply to ?
what is the type of "cs" ?

Kalpesh
 
D

Daniel Bello Urizarri

Hi Kalpesh:

In Ado.Net 2.0 DbConnection.GetSchema("Tables").

I have Ado.Net Providers, not oledb providers, so my problem can't be solved
only with oledb.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top