Subject | Re: [Firebird-Java] Insert performance |
---|---|
Author | Blas Rodriguez Somoza |
Post date | 2002-11-22T03:08:21Z |
Hello
If you have an error in an execute or executeUpdate, the driver will send a SQLException, so you don't need the line count.
Only if you need to know how many lines are affected then you must use the line count.
If you really need to know the rows affected then use executeUpdate, but you will pay the overload.
Regards
Blas Rodriguez Somoza.
If you have an error in an execute or executeUpdate, the driver will send a SQLException, so you don't need the line count.
Only if you need to know how many lines are affected then you must use the line count.
If you really need to know the rows affected then use executeUpdate, but you will pay the overload.
Regards
Blas Rodriguez Somoza.
----- Original Message -----
From: "William L. Thomson Jr." <support@...>
To: "Firebird-Java" <Firebird-Java@yahoogroups.com>
Sent: Friday, November 22, 2002 12:13 AM
Subject: Re: [Firebird-Java] Insert performance
> Blas,
>
> On Thu, 2002-11-14 at 18:43, Blas Rodriguez Somoza wrote:
> > The problem only happen when the insert/update/delete are executed with executeUpdate. After the command runs, Jaybird needs
to
> > ask the server about insert/delete/update lines, because the server don't include those counts in the response, and
executeUpdate
> > must return the line count.
>
> So basically using executeUpdate calls internalExecute and
> getUpdateCount?
>
> But if I switch to and use execute instead of executeUpdate, I will then
> need to call getUpdateCount myself no?
>
> How else can I determine if the update/insert/delete was successful or
> not?
>
> execute returns a boolean value but from what I have read and understand
> that value has no bearing on whether or not the command succeeded. Only
> if it returns a ResultSet object or not?
>
> > Using execute instead of executeUpdate Jaybird performs near Interclient on local connections and better on remote
connections.
> >
>
> But in the end if I must call execute and then getUpdateCount, and I
> just better off sticking with executeUpdate?
>
> Thanks.
>
> --
> Sincerely,
> William L. Thomson Jr.
> Support Group
> Obsidian-Studios Inc.
> 439 Amber Way
> Petaluma, Ca. 94952
> Phone 707.766.9509
> Fax 707.766.8989
> http://www.obsidian-studios.com
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>