GetSchema and PrimaryKeys - getting primary key column name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sebastijan
    New Member
    • Mar 2008
    • 1

    GetSchema and PrimaryKeys - getting primary key column name

    Hi

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

    When I call (to get primary keys metadata)

    DataTable pkeys = DbConnection.Ge tSchema("Primar yKeys"...
    foreach (DataRow dr in pkeys.Rows)
    {
    string pkTable = dr["TABLE_NAME "].ToString();
    // COLUMN_NAME does not exist
    //string columnName = dr["COLUMN_NAM E"].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
Working...