Entity from PK with identity: set value manually - possible?

Posts   
 
    
Sokon1
User
Posts: 97
Joined: 17-Jul-2006
# Posted on: 14-Nov-2006 09:41:24   

Hi,

I've got an DB-table which has an PK and the identity property set to true. Now I want to set the PK manually in my entity and save it. is that possible?

Thanks for your hints!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 14-Nov-2006 09:51:55   

example: myCustomer.Fields[(int)CustomerFieldindex.CustomerID].ForcedCurrentValueWrite(newValue);

if you want to SET the identity field in the db as well (thus do an insert), the db table has to be setup for this.

Frans Bouma | Lead developer LLBLGen Pro