ADO Addnew and identity columns
From: Jan van Veldhuizen <jan_at_van-veldhuizen.nl>
Date: Wed, 6 Oct 2004 13:31:10 +0200
Message-ID: <4163d817$0$78279$e4fe514c_at_news.xs4all.nl>
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?
rs.Update
MsgBox rs("id")
Date: Wed, 6 Oct 2004 13:31:10 +0200
Message-ID: <4163d817$0$78279$e4fe514c_at_news.xs4all.nl>
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.Update
MsgBox rs("id")
mConn.Close Received on Wed Oct 06 2004 - 13:31:10 CEST