M
Maciek Januchowski
Hi
I create insert command object with command builder and then
add "; SELECT SCOPE_IDENTITY() as primary_key_field" formula to
CommandText property of this object. I also set its UpdateRowSource
property to FirstReturnedRecord.
After calling update method of data adapter I do not get new
primary key value.
I did the same without using command builder (I create insert
command object in code "manually" and it's identical to the one
which is created by the command builder) and everything seems to work fine.
Do someone have any idea why retrieving autoincrement value
doesn't work when I use CommandBuilder?
Thanks for any clues
Maciek
ps. If you need to see a code example let me know.
I create insert command object with command builder and then
add "; SELECT SCOPE_IDENTITY() as primary_key_field" formula to
CommandText property of this object. I also set its UpdateRowSource
property to FirstReturnedRecord.
After calling update method of data adapter I do not get new
primary key value.
I did the same without using command builder (I create insert
command object in code "manually" and it's identical to the one
which is created by the command builder) and everything seems to work fine.
Do someone have any idea why retrieving autoincrement value
doesn't work when I use CommandBuilder?
Thanks for any clues
Maciek
ps. If you need to see a code example let me know.