Retrieving autogenerated data in insert on ADODataset

528 Views Asked by At

I actually try to do an insert on a ADODataset linked on a table with an auto-generated GUID. When I try to get the new ID of my record I get some zero for GUID.

1

There are 1 best solutions below

1
On

This is an old question but if anyone comes across it...

The big advantage of using GUIDs is that you don't care where they originate from. A value generated as part of a default constraint is no better or worse than a correctly generated GUID in a client program.

@Ravaut123 is correct in that you should just set the GUIDs value when inserting on the TADOataSet set