Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread EDBConnection.GetSchema implementation?
Mon, Feb 9 2009 7:01 AMPermanent Link

"Hedley Muscroft"
Hi,

Please can someone tell me what collection identifiers are supported by
EDBConnection.GetSchema?

Currently, the only one that seems to work is GetSchema("tables"). The other
usual collections provided by most ADO.NET providers throw an "Invalid
schema table roles specified" exception.

Other ADO.NET providers I have worked with usually provide at least the
following :-

columns
tables
views
indexes

Here's a full list of the identifiers available in the
OleDbConnection.GetSchema() implementation :-
http://stackoverflow.com/questions/453683/list-of-dbconnection-getschema-collection-names

This website shows some of the identifiers for SQL Server :-
http://www.davidhayden.com/blog/dave/archive/2006/01/15/2734.aspx

In case it will help, I've also uploaded an excerpt from the PGSQL ADO.NET
provider documentation which gives more details about the GetSchema()
routine along with some sample code :-
http://www.pioneersoftware.co.uk/temp/Sample_GetSchema_Doc.pdf

Many thanks!
Mon, Feb 9 2009 5:34 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hedley,

<< Please can someone tell me what collection identifiers are supported by
EDBConnection.GetSchema? >>

They are listed in the SQL manual:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=3&topic=62

Just use the name of the Information schema table as the collection
identifier.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Feb 9 2009 5:54 PMPermanent Link

"Hedley Muscroft"
Thanks for that link Tim - "tablecolumns" is the one I was really looking
for.

Hedley
Tue, Feb 10 2009 6:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hedley,

<< Thanks for that link Tim - "tablecolumns" is the one I was really looking
for. >>

No problem.  Remember also that you can simply just query the base
configuration/catalog tables using a normal EDBCommand instance.   Sometimes
it might be easier to do that instead.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image