๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.interclient
Article #31

Re: Problems with interclient 1.6 and Interbase 6

#31
From: Quinn Wildman
Date: Mon, 07 Aug 2006 17:11
49 lines
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?
Technical Details
Message-ID: <44d77396$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <44d6aa75$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: Mon, 07 Aug 2006 10:11:29 -0700
From: Quinn Wildman <qwildman@borland.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>
In-Reply-To: <44d6aa75$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 143.186.66.73
Message-ID: <44d77396$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1154970518 143.186.66.73 (7 Aug 2006 10:08:38 -0700)
Lines: 49
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail