L
Lloyd Dupont
I have a database-generic application.
CommandBuilder is not satisfactory.
I try to generate my own command automatically but:
I can't get PrimaryKey information !
I create a
IDbCommand cmd;.
cmd.CommandText = SELECT * FROM Table
IDataReader dr = cmd.ExecuteReader(CommmandBehavior.SchemaOnly)
and then I analyse
dr.GetSchemaTable()
the column "IsKey" is always set to DBNull.Value, at last on the PocketPC
(with the compact framework)
I know there is plenty of meta table in SqlServer.
which one should I query to get primary key information ?
CommandBuilder is not satisfactory.
I try to generate my own command automatically but:
I can't get PrimaryKey information !
I create a
IDbCommand cmd;.
cmd.CommandText = SELECT * FROM Table
IDataReader dr = cmd.ExecuteReader(CommmandBehavior.SchemaOnly)
and then I analyse
dr.GetSchemaTable()
the column "IsKey" is always set to DBNull.Value, at last on the PocketPC
(with the compact framework)
I know there is plenty of meta table in SqlServer.
which one should I query to get primary key information ?