Subject | Re: [Firebird-Java] DATE with Jaybird |
---|---|
Author | Rick Fincher |
Post date | 2004-01-01T17:39:06Z |
Hi Reinhard,
You need to create the database TEST.gdb as a dialect 3 database.
The error message:
means that dialect 1 doesn't support the operation you are trying to
perform.
I was under the impression that Firebird 1.5 won't support dialect 1 or 2
databases, but I could be wrong about that.
If you have older databases that were created with dialect 1 or 2 you will
need to migrate them to dialect 3. Otherwise, just be sure to create them
as dialect 3.
If you are using some of the older tools to create the database, they might
default to dialect 1, and you will have to specify dialect 3 before creating
the database.
Hope this helps!
Rick
You need to create the database TEST.gdb as a dialect 3 database.
The error message:
> Metadata update statement is not allowed by the current database SQLdialect 1
means that dialect 1 doesn't support the operation you are trying to
perform.
I was under the impression that Firebird 1.5 won't support dialect 1 or 2
databases, but I could be wrong about that.
If you have older databases that were created with dialect 1 or 2 you will
need to migrate them to dialect 3. Otherwise, just be sure to create them
as dialect 3.
If you are using some of the older tools to create the database, they might
default to dialect 1, and you will have to specify dialect 3 before creating
the database.
Hope this helps!
Rick
----- Original Message -----
> Why can't I create a table with a DATE field? (See sample code)
> How can I change the SQL dialect?
> I am using "Firebird-1.5.0.4201_RC8-Win32" and
> "FirebirdSQL-
> 1.5.0BetaJDK_1.4".
>
> Sample code:
>
> try {
> Class.forName("org.firebirdsql.jdbc.FBDriver");
>
> Connection conn = DriverManager.getConnection (
> "jdbc:firebirdsql:localhost/3050:C:/db/TEST.gdb",
> "SYSDBA",
> "masterkey");
>
> Statement comm = conn.createStatement();
>
> comm.executeUpdate("CREATE TABLE table3(field DATE)");
>
> } catch (Exception e) {
> System.err.println(e.toString());
> }
>
> Exception:
>
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569.
> Dynamic SQL Error
> SQL error code = -817
> Metadata update statement is not allowed by the current database SQL
> dialect 1
>
> Sorry about my English and thanks.
> Reinhard