Groups
Groups
Sign in
Groups
Groups
DbLinq
Conversations
About
Send feedback
Help
oracle get primary key value after an insert
53 views
Skip to first unread message
Justin
unread,
Nov 18, 2010, 11:41:12 AM
11/18/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DbLinq
All,
Using oracle and DBLinq, how can I perform an insert and get the
sequence value back into my primary key? I cannot figure it out.
I have something like this:
Employee emp = new Employee();
emp.Name = "joe";
db.Employee.InsertOnSubmit(emp);
db.SubmitChanges();
// how do I get the primary key value now?
int recordID = emp.ID; // ID returns 0 but is 9 in the database table
Thanks for any help!
/Justin
Reply all
Reply to author
Forward
0 new messages