Article View: borland.public.interbase.interclient
Article #32Re: Problems with interclient 1.6 and Interbase 6
From: 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?
Technical Details
Message-ID:
<44d7f4e8@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<44d6aa75$1@newsgroups.borland.com> <44d77396$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f54da,23e9c41c93085b9c X-Google-Attributes: gidf54da,public X-Google-Language: ENGLISH,ASCII Date: Tue, 08 Aug 2006 04:20:26 +0200 From: Luzem <luzemail@gmail.com> User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 Newsgroups: borland.public.interbase.interclient Subject: Re: Problems with interclient 1.6 and Interbase 6 References: <44d6aa75$1@newsgroups.borland.com> <44d77396$1@newsgroups.borland.com> In-Reply-To: <44d77396$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 83.34.21.128 Message-ID: <44d7f4e8@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1155003624 83.34.21.128 (7 Aug 2006 19:20:24 -0700) Lines: 53 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail