A
Anton Sommer
Hello folks,
I try to build the InsertCommand of a DataAdapter manually so that the
PrimaryKey value in the aplications DataTable is changed to the value that
is returned by the select @@identity. Of course the PrimaryKey Value in the
DataTable is -1...
When I let the DataAdapter be created by visual studio, it is performing
alright.
But when I create my own insertcommand it only inserts data but the
DataTables PrimaryKey is not updated, although I have added to the
insertcommand.commandtext+=" select @@identity as MyCol" and have set the
UpdatedRowSource to both.
Any ideas how the I can make it update my table.
Thank you
Anton
I try to build the InsertCommand of a DataAdapter manually so that the
PrimaryKey value in the aplications DataTable is changed to the value that
is returned by the select @@identity. Of course the PrimaryKey Value in the
DataTable is -1...
When I let the DataAdapter be created by visual studio, it is performing
alright.
But when I create my own insertcommand it only inserts data but the
DataTables PrimaryKey is not updated, although I have added to the
insertcommand.commandtext+=" select @@identity as MyCol" and have set the
UpdatedRowSource to both.
Any ideas how the I can make it update my table.
Thank you
Anton