| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> ADO Addnew and identity columns
I have an application which is running fine with MS SqlServer, but it should
be working with Oracle as weel.
At a lot of places we rely upon the ADO Recordset to return incremented
identity columns.
Oralce however returns null or zero.
How can this be fixed easily?
Dim mConn As New ADODB.Connection
Dim rs As New ADODB.Recordset
mConn.ConnectionString = "Provider=OraOLEDB.Oracle;User ID=user;Password=pwd;Data Source=dbname;" mConn.Open
rs.Open "select * from testidentity where id < -1", mConn,
adOpenForwardOnly, adLockPessimistic
rs.AddNew "name", "peter"
rs.Update
MsgBox rs("id")
mConn.Close Received on Wed Oct 06 2004 - 06:31:10 CDT
![]() |
![]() |