the primarykey property on the datatable object

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

Guest

Hi
Does primarykey property on the datatable object always need to be set in your code (for use with datarow.find) or should this be set automatically from your database tables primary key coz this dosnt seem to happening for me??

Ta
 
Hi,

The even if your database has a primary key you must add it to your
datatable with code.

Ken
------------
alan said:
Hi
Does primarykey property on the datatable object always need to be set in
your code (for use with datarow.find) or should this be set automatically
from your database tables primary key coz this dosnt seem to happening for
me??
 
Hi Alan,

In addition to Ken, one of the kind of code you could use to set before your
daadapter.fill is

Mydataadapter.MissingSchemaAction = MissingSchemaAction.AddWithKey

I hope this helps

Cor
Does primarykey property on the datatable object always need to be set in
your code (for use with datarow.find) or should this be set automatically
from your database tables primary key coz this dosnt seem to happening for
me??
 
Back
Top