Home All Groups Group Topic Archive Search About

Is there any way to get database schema in generic way?

Author
8 Feb 2006 12:48 AM
Young Jin
I'm writing code that provides generic view(vendor independent) to the
client about table list, primary key or view. Almost all connections
are made via vendor's .NET provider.

I researched and found that OleDbConnection.GetOleDbSchemaTable() can
make it. But I only make connection via .NET provider, so it's
impossible.

Is there anybody has idea about generic way to get db schema in
ado.net?

Thank you in advance.

Author
8 Feb 2006 2:42 AM
Val Mazur (MVP)
Hi,

Since each database has its own internal format, there is no generic way to
get schema definition. Most generic way, actually, is using that Oledb
provider. But why does not it work for you?

--
Val Mazur
Microsoft MVP
http://xport.mvps.org

Show quote
"Young Jin" wrote:

> I'm writing code that provides generic view(vendor independent) to the
> client about table list, primary key or view. Almost all connections
> are made via vendor's .NET provider.
>
> I researched and found that OleDbConnection.GetOleDbSchemaTable() can
> make it. But I only make connection via .NET provider, so it's
> impossible.
>
> Is there anybody has idea about generic way to get db schema in
> ado.net?
>
> Thank you in advance.
>
>

AddThis Social Bookmark Button