Can't find primary key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a dataset that I first do a FillSchema(dataset, SchemaType.Mapped, "Table") on, and yet it still throws System.Data.MissingPrimaryKeyException when I do a dataset.tables("Table").Rows.Find(key).

The column is marked as a primary key in the table and the sql statement is just "SELECT * FROM tableName"

Anybody have any idea why this can happen?

P.S. Sorry if I didn't give enough info, but I am patching together someone else's mess, so I haven't gotten a chance to read it all yet.

-Thanks
 
When you say 'the table', do that mean on the DB Side, or is that a PK
Defined client side on the Datatable?

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
Devin said:
I have a dataset that I first do a FillSchema(dataset, SchemaType.Mapped,
"Table") on, and yet it still throws System.Data.MissingPrimaryKeyException
when I do a dataset.tables("Table").Rows.Find(key).
The column is marked as a primary key in the table and the sql statement
is just "SELECT * FROM tableName"
Anybody have any idea why this can happen?

P.S. Sorry if I didn't give enough info, but I am patching together
someone else's mess, so I haven't gotten a chance to read it all yet.
 
Back
Top