Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,805 of 2,288    |
|    Jan van Veldhuizen to All    |
|    ADO Addnew and identity columns    |
|    06 Oct 04 13:31:10    |
   
   XPost: comp.database.oracle, relcom.comp.dbms.oracle   
   From: jan@van-veldhuizen.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.AddNew "name", "peter"   
   rs.Update   
   MsgBox rs("id")   
      
   mConn.Close   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca