Subject Re: [Firebird-Java] Setting dialect when running SQL...?
Author Helen Borrie
At 03:39 AM 7/06/2004 +0000, you wrote:
>Hi, I have a new Firebird 1.5 database, dialect 3. Via java
>(Statement.executeUpdate) I am running a database creation/population
>script, and I get the odd error when running it (some bits of my
>script need fixing).
>However the errors that come up a reminiscent of dialect1 errors, not
>dialect3. I.e I often get '104' errors, not '206' errors (hope those
>numbers are right, don't have them in front of me right now).


>Maybe
>I'm mistaken, but I understood from my scanning thru the dialect 1/3
>stuff that 104 vs 206 errors are one of the differences between the
>dialects.

Yes, you're mistaken. These are groups of exceptions, both of which can
occur in either dialect. The -104 SQLCODE covers scores of GDSCODE
exceptions (9-digit codes) relating to invalid object references or
undefined objects. If the Java client isn't returning the GDSCODE, or at
least the equivalent text message, then identifying the exception will be
like looking for the proverbial needle in a haystack.

>If so, even though I have created a dialect 3 database, is there
>something I need to put in my code to tell it that I'm executing
>dialect 3 statements? (Maybe there's something in JDBC that I missed...)

Not in your code...a Dialect 3 database expects Dialect 3 statements, a
Dialect 3 client delivers Dialect 3 statements. The Fb 1.5 API should
connect as a Dialect 3 client by default. I can't say whether this has
been implemented in Jaybird, though, since it's not a JDBC standard.

If not, there should be some Jaybird connection parameter equivalent to SET
SQL DIALECT 3. Have you read the FAQ re connections?

Helen