Hello Raj,

if you ask for the 'autogeneratedKeys' flag of JDBC (and the method 
'getGeneratedKeys() of java.sql.Statement), 
this is not supported by SAP DB. 

But you can use a DEFAULT SERIAL, and query its value after insertion
using a 

  SELECT table.CURRVAL FROM DUAL

to get the last value inserted by the current session into 'table'.

Regards

Alexander Schr�der
SAP DB, SAP Labs Berlin 

> -----Original Message-----
> From: rajendra reddy [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 04, 2003 12:43 PM
> To: [EMAIL PROTECTED]
> Subject: problem with retreiving record immediately after insertion
> 
> 
> hi
>  i am new to sapdb,i am using sapdb7.4 on windows NT
> and using java as an interface to access the
> database,i am using jdbc type 4 driver provided by
> sapdb.org.
>  the problem is i am inserting into a record and i
> want the value of the primary key as soon as this is
> inserted back to insert into other table...and this is
> multiuser environoment.so please help me if anyone
> knows regarding this..
> 
> regards
> raj 
> 
> ______________________________________________________________
> __________
> Send free SMS using the Yahoo! Messenger. Go to 
> http://in.mobile.yahoo.com/new/pc/
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
> 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to