Addnew with oracle
Hello,
I am using Oracle. I have a table with colume ID. I want to add sequence number to my ID when ever new record is added to the table. I have also created sequence in oracle.
Can someone help me on how to add a new record with ID incremented based on sequence in Oracle.
My code (without ID) is
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = dbconn
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Source = "SHAHP.Project"
rs.Open
If Not IsEmpty(Request.Form) Then
rs.AddNew
rs("title") = Request.form("title")
rs("owner") = Request.form("owner")
rs.Update
rs.MoveFirst
End If
|