Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get feedback form JDBC insert statement (i.e.: "1 row inserted")
Per Magnus L?vold wrote:
> Hi,
> I am working on a Java application which inserts data into an Oracle
> database.
>
> I am looking for a way to retreive the feedback from an insert
> statement.
> After inserting a row, the resultset and result set meta data are
> empty. I wonder how to retrieve the "1 row inserted" or feedback after
> performing the INSERT.
> Or do I perhaps have to create this logic myself? I.e. when the insert
> statement is executed silently, the row is successfully inserted? (-->
> "1 row inserted")
Per,
I couldn't find any of your code (nor of your environment) in your
post, so I can only guess at how you are performing your INSERT.
In any case, when doing an INSERT, either it works -- or you get an "SQLException". So if you don't get an exception, then I suppose you can assume that row(s) have been inserted.
Now if you care to post the relevant part of your code (and perhaps details of your environment), I may be able to give you something a bit more concrete.
Good Luck,
Avi.
Received on Thu Aug 12 2004 - 05:05:31 CDT
![]() |
![]() |