db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Derby Stored Procedure Help!
Date Tue, 14 Apr 2009 14:15:38 GMT
Hello,

If the code is running inside a database procedure, then I think that an 
OUT parameter is a good solution.

Regards,
-Rick

sivagururaja wrote:
> Hello,
>
> I need one more help. Here is my code,
>
> String str="insert into sam.Stud values(1,'Sivagururaja')";
> Statement st=con.createStatement();
> int PatientRowsUpdated = st.executeUpdate(str);
> if(PatientRowsUpdated>0)
> {
>      System.out.println('Inserted Successfully');
> }
>
> Using the above code, i know whether the record is getting inserted or not.
> Now i'm going to use the stored procedure. Is it possible to check whether
> the record 
> is inserted or not. If yes, Can you please tell me, where should i write the
> code.
> Should i use one OUT parameter for the status or it can be achieved through
> my java method something 
> like the above.
>
> Thanks in advance.
>   


Mime
View raw message