Hi
I want to retrieve the primary key value of a row i just inserted. The primary key values are automatically generated. I want to insert that primary key value into another table as a foreign key.
This is the code to insert data in 1st table
Core.DB.DoQuery("insert into survey(id,title, detail,employerid,userid) values(@id,@title, @detail, @eid, @uid);", Core.DB.SIP("title", surveyTitle.Text), Core.DB.SIP("detail", surveyDetail.Text), Core.DB.SIP("eid", LocalHelper.UserEmployerID()), Core.DB.SIP("uid", LocalHelper.UserID()), Core.DB.SIP("id", survey))
In the above code the id which is the primary key is automatically generated. I want to retrieve that value to insert it on another table.
How can I retrieve the value