470,849 Members | 1,223 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

GetSchema and PrimaryKeys - getting primary key column name


I am interested in DbConnection.GetSchema method of ODP.NET oracle library.

When I call (to get primary keys metadata)

DataTable pkeys = DbConnection.GetSchema("PrimaryKeys"...
foreach (DataRow dr in pkeys.Rows)
string pkTable = dr["TABLE_NAME"].ToString();
// COLUMN_NAME does not exist
//string columnName = dr["COLUMN_NAME"].ToString(); // Not Working in odp.net

I do not see a primary key column name in result.
In core GetOleDbSchema("PrimaryKeys"... method there was a column name called COLUMN_NAME.

How can I get primary key column names in this GetSchema method? Cause this is what I actually requested for.

Mar 5 '08 #1
0 2508

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Paul Hunter | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.