Hi,
But pl note that, if somehow insert statement executes and transaction
fails, then the sequence gets incremented(i.e one value gets wasted).
--Mukul

At 07:17 AM 7/13/99 -0500, Lageson, Tom wrote:
>Wilson,
>Sequence.nextval is an oracle statement.  It needs to be used in a SQL
>statement.  Simply put it in your insert statement such as
>insert into temp values(sequence.nextval,'data','data','data');
>
>- Tom
>
>
>
>
>> ----------
>> From:         Wilson. P[SMTP:[EMAIL PROTECTED]]
>> Reply To:     A mailing list for discussion about Sun Microsystem's Java
>> Servlet API Technology..
>> Sent:         Tuesday, July 13, 1999 4:13 AM
>> To:   [EMAIL PROTECTED]
>> Subject:      How to set the sequence number thru JDBC?
>>
>> <<File: wilsonp.vcf>>
>> Hi
>>
>> I'm using prepared statement for insertion. Now, I would like to insert
>> the next sequence value to the colulmn.How to do that?
>>
>> Ex: InsertTemp.SetInt(1,sequence.nextval);
>>
>> But, this is not working..
>>
>> - wilson

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to