468,121 Members | 1,567 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

GetSchema and PrimaryKeys - getting primary key column name

Hi

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.

Regards,
Sebastijan
Mar 5 '08 #1
0 2425

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
18 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.