Groups > Interbase > InterClient > Re: Problems with interclient 1.6 and Interbase 6




Problems with interclient 1.6 and Interbase 6

Problems with interclient 1.6 and Interbase 6
Mon, 07 Aug 2006 04:50:32 +020
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.gd
b","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,P
VP2,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

Post Reply
Re: Problems with interclient 1.6 and Interbase 6
7 Aug 2006 09:07:11 -0700
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:
Post Reply
Re: Problems with interclient 1.6 and Interbase 6
Mon, 07 Aug 2006 10:11:29 -070
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.gd
b","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,P
VP2,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
> 
Post Reply
Re: Problems with interclient 1.6 and Interbase 6
Tue, 08 Aug 2006 04:20:26 +020
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.gd
b","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,P
VP2,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?
Post Reply
about | contact