Thread View: borland.public.interbase.interclient
4 messages
4 total messages
Started by Luzem
Mon, 07 Aug 2006 02:50
Problems with interclient 1.6 and Interbase 6
Author: Luzem
Date: Mon, 07 Aug 2006 02:50
Date: Mon, 07 Aug 2006 02:50
43 lines
2410 bytes
2410 bytes
I'm runing Windows XP SP2 and when try move in a ResultSet I Obtain a
SQLException
//I open a connection, loading the driver (I don't put try{}catch(){}):
Class.forName("interbase.interclient.Driver");
Connection
Conexion=DriverManager.getConnection("jdbc:interbase://127.0.0.1/C:/COSA.gdb","pepito","pepito");
//make a Statement
Statement stmArticulos= conecta.getConexion().createStatement();
//make a query (Ok the database desing sucks but isn't my desing)
//change the dialect
stmArticulos.executeQuery("SET SQL DIALECT 1;");
ResultSet rsArticulos=stmArticulos.executeQuery("select
PK_ARTICULO,MODIFICACION,REFERENCIA,NOMBRE,TIPO_IVA,TIPO_RECARGO,PVP1,PVP1_IVA,PVP2,PVP2_IVA,PVP3,PVP3_IVA,PVP4,PVP4_IVA
from articulos")
//and try to move arround the resulset
do{
System.out.println(this.getRsArticulos().getString(1));
}while (this.getRsArticulos().next());
and obtain a dialect error
Ok I read some webs and the problem must be in the Dialect
If Dialect is set to 3,2 or 1 I obtain this exception:
interbase.interclient.SQLException: [interclient][interbase] Dynamic SQL
Error
SQL error code = -104
Token unknown - line 1, char 4
SQL
If i not set dialect removing the line stmArticulos.executeQuery("SET
SQL DIALECT 1;"); I obtain this exception:
interbase.interclient.SQLException: [interclient][interbase] Dynamic SQL
Error
SQL error code = -206
Column unknown
TIPO_IVA
Client SQL dialect 1 does not support reference to 64-bit numeric datatype
�Someone can help me?
Re: Problems with interclient 1.6 and Interbase 6
Author: Craig Stuntz TeamB
Date: Mon, 07 Aug 2006 16:07
Date: Mon, 07 Aug 2006 16:07
15 lines
1554 bytes
1554 bytes
Luzem wrote: > SET SQL DIALECT 1; This is for ISQL only. It won't work in an app. I don't know if IC 1.6 supports dialect 3. It's *very* old. Check the IC documentation for how to set your correct client dialect. You *may* need a newer version of IC. -- Craig Stuntz [TeamB] � Vertex Systems Corp. � Columbus, OH Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz How to ask questions the smart way: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Problems with interclient 1.6 and Interbase 6
Author: Quinn Wildman
Date: Mon, 07 Aug 2006 17:11
Date: Mon, 07 Aug 2006 17:11
49 lines
2816 bytes
2816 bytes
SET SQL DIALECT is not a SQL command the interbase server understands.
So, you cannot do it with interclient. use datasource.setSQLDialect(n)
to set the SQL Dialect.
Luzem wrote:
> I'm runing Windows XP SP2 and when try move in a ResultSet I Obtain a
> SQLException
>
> //I open a connection, loading the driver (I don't put try{}catch(){}):
> Class.forName("interbase.interclient.Driver");
> Connection
> Conexion=DriverManager.getConnection("jdbc:interbase://127.0.0.1/C:/COSA.gdb","pepito","pepito");
>
> //make a Statement
> Statement stmArticulos= conecta.getConexion().createStatement();
> //make a query (Ok the database desing sucks but isn't my desing)
> //change the dialect
> stmArticulos.executeQuery("SET SQL DIALECT 1;");
> ResultSet rsArticulos=stmArticulos.executeQuery("select
> PK_ARTICULO,MODIFICACION,REFERENCIA,NOMBRE,TIPO_IVA,TIPO_RECARGO,PVP1,PVP1_IVA,PVP2,PVP2_IVA,PVP3,PVP3_IVA,PVP4,PVP4_IVA
> from articulos")
> //and try to move arround the resulset
> do{
> System.out.println(this.getRsArticulos().getString(1));
> }while (this.getRsArticulos().next());
> and obtain a dialect error
>
> Ok I read some webs and the problem must be in the Dialect
>
>
> If Dialect is set to 3,2 or 1 I obtain this exception:
>
> interbase.interclient.SQLException: [interclient][interbase] Dynamic SQL
> Error
> SQL error code = -104
> Token unknown - line 1, char 4
> SQL
>
> If i not set dialect removing the line stmArticulos.executeQuery("SET
> SQL DIALECT 1;"); I obtain this exception:
>
> interbase.interclient.SQLException: [interclient][interbase] Dynamic SQL
> Error
> SQL error code = -206
> Column unknown
> TIPO_IVA
> Client SQL dialect 1 does not support reference to 64-bit numeric datatype
>
> �Someone can help me?
Re: Problems with interclient 1.6 and Interbase 6
Author: Luzem
Date: Tue, 08 Aug 2006 02:20
Date: Tue, 08 Aug 2006 02:20
52 lines
2968 bytes
2968 bytes
Thanks
Quinn Wildman escribi�:
> SET SQL DIALECT is not a SQL command the interbase server understands.
> So, you cannot do it with interclient. use datasource.setSQLDialect(n)
> to set the SQL Dialect.
>
> Luzem wrote:
>> I'm runing Windows XP SP2 and when try move in a ResultSet I Obtain a
>> SQLException
>>
>> //I open a connection, loading the driver (I don't put try{}catch(){}):
>> Class.forName("interbase.interclient.Driver");
>> Connection
>> Conexion=DriverManager.getConnection("jdbc:interbase://127.0.0.1/C:/COSA.gdb","pepito","pepito");
>>
>> //make a Statement
>> Statement stmArticulos= conecta.getConexion().createStatement();
>> //make a query (Ok the database desing sucks but isn't my desing)
>> //change the dialect
>> stmArticulos.executeQuery("SET SQL DIALECT 1;");
>> ResultSet rsArticulos=stmArticulos.executeQuery("select
>> PK_ARTICULO,MODIFICACION,REFERENCIA,NOMBRE,TIPO_IVA,TIPO_RECARGO,PVP1,PVP1_IVA,PVP2,PVP2_IVA,PVP3,PVP3_IVA,PVP4,PVP4_IVA
>> from articulos")
>> //and try to move arround the resulset
>> do{
>> System.out.println(this.getRsArticulos().getString(1));
>> }while (this.getRsArticulos().next());
>> and obtain a dialect error
>>
>> Ok I read some webs and the problem must be in the Dialect
>>
>>
>> If Dialect is set to 3,2 or 1 I obtain this exception:
>>
>> interbase.interclient.SQLException: [interclient][interbase] Dynamic
>> SQL Error
>> SQL error code = -104
>> Token unknown - line 1, char 4
>> SQL
>>
>> If i not set dialect removing the line stmArticulos.executeQuery("SET
>> SQL DIALECT 1;"); I obtain this exception:
>>
>> interbase.interclient.SQLException: [interclient][interbase] Dynamic
>> SQL Error
>> SQL error code = -206
>> Column unknown
>> TIPO_IVA
>> Client SQL dialect 1 does not support reference to 64-bit numeric
>> datatype
>>
>> �Someone can help me?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads