After .AddNer you cant see the new value, but have you tried after .Update ?

bye

Max


-----Messaggio originale-----
Da: news [mailto:[EMAIL PROTECTED] conto di Daniel Dittmar
Inviato: lunedi 20 ottobre 2003 0.45
A: [EMAIL PROTECTED]
Oggetto: Re: ADO 2.8, VB6, SAPDB table with PK = SERIAL(1): cannot see
PK value in recordset


Nick Damoulakis wrote:
> when I use an ADO recordset to .AddNew      (using a server-side 
> cursor), I cannot see the value that SAPDB inserts in the USERID 
> column.  This is a problem as I need to use that value (the PK)  in the 
> remainder of my source.
> If I try a .ReSync on the recordset I get the following error:
> <Current provider does not support refreshing underlying values.>

You can accesss of the recently generated value with TBL_USERS.CURRVAL. 
You can either execute "SELECT TBL_USERS.CURRVAL FROM dual" to get the 
value into a VB valiable or you can use the expression directly in an 
INSERT : "INSERT INTO othertable (keycol, foreignkey) values  (?, 
TBL_USERS.CURRVAL)".

Daniel Dittmar

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org



-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to