|
Question : insert query in code behind asp.net
|
|
Hi, I need to insert 3 values in my database table using code behind, but I have a lot of problem with syntax... I have declared in the page_load and th value inserted should come from there lblcreateuserid.Text = Server.HtmlEncode(Request.Cookies("userInfo")("USERID"))
NBDFOLLOWUPID should be incremented, I can get the value from select max(NBDFOLLOWUPID) +1 from NBDFOLLOWUP
JOURNALID is also coming from a query select max(JOURNALID) +1 from JOURNAL
the original query is insert into NBDFOLLOWUP (NBDFOLLOWUPID, JOURNALID, CREATEUSERID) VALUES (:NBDFOLLOWUPID, :JOURNALID, :CREATEUSERID)
Could you help me format the code for this,
Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) 'the code I need' End Sub
thanks a lot !
|
|
Answer : insert query in code behind asp.net
|
|
hi talentium,
create two sequence in the oracle one for NBDFOLLOWUPID, and other for the JOURNALID
use this sequences in ur insert statement.
|
|
|
|