Return-Path: Delivered-To: apmail-db-ojb-user-archive@www.apache.org Received: (qmail 87914 invoked from network); 3 Oct 2003 12:45:56 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Oct 2003 12:45:56 -0000 Received: (qmail 42325 invoked by uid 500); 3 Oct 2003 12:45:48 -0000 Delivered-To: apmail-db-ojb-user-archive@db.apache.org Received: (qmail 42309 invoked by uid 500); 3 Oct 2003 12:45:48 -0000 Mailing-List: contact ojb-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Users List" Reply-To: "OJB Users List" Delivered-To: mailing list ojb-user@db.apache.org Received: (qmail 42288 invoked from network); 3 Oct 2003 12:45:47 -0000 Received: from unknown (HELO bigbox.plug-in.com.br) (200.192.140.14) by daedalus.apache.org with SMTP; 3 Oct 2003 12:45:47 -0000 Received: from sqlmgr (200-102-210-187.paemt7013.e.brasiltelecom.net.br [200.102.210.187]) by bigbox.plug-in.com.br (8.11.6/8.11.6) with ESMTP id h93CXYk04805 for ; Fri, 3 Oct 2003 09:33:35 -0300 Message-ID: <001301c389ac$53f60c40$7c0a0a0a@mgrinformatica.com.br> From: "Edson Carlos Ericksson Richter" To: "OJB Users List" References: <3F7D3150.1070608@gmx.ch> Subject: Re: Problem with keyword as column name Date: Fri, 3 Oct 2003 09:46:09 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000E_01C38993.2C567FD0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_000E_01C38993.2C567FD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MS SQL accepts keywords in two ways: using [] and using ". Have you = tested I think the only problem should be with XML sintax... Jakob, the escaped = values should be sent directly to database (but then we are loosing the = database independency, since escaped sintax could differ from database = to database). Edson ----- Original Message -----=20 From: Jakob Braeuchi=20 To: OJB Users List=20 Sent: Friday, October 03, 2003 5:20 AM Subject: Re: Problem with keyword as column name hi oliver, what would the correct sql look like using the escaped column name ? jakob Oliver Rutherfurd wrote: >I'm having problems using OBJ (1.0rc3) to access a table in SQL = Server which >has a column named "Key". I defined the field in my repository.xml = file >like so: > > jdbc-type=3D"VARCHAR" > name=3D"key"/> > >I get the following error: > > java.sql.SQLException: [JCDEVDB]Incorrect syntax near the keyword = 'Key'. > >I tried to escape the column name in the repository.xml file, like = so: > > jdbc-type=3D"VARCHAR" > name=3D"key"/> > >I got the following error: > > java.util.NoSuchElementException: Could not obtain next object: = Error >reading from result set: [TDS Driver]Column '[Key]' not found. > >Much as I'd like to change the column name, so this problem would = just go >away, it's not an option. How can I get this to work? > >Thanks, >-Ollie > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org >For additional commands, e-mail: ojb-user-help@db.apache.org > > > =20 > --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org For additional commands, e-mail: ojb-user-help@db.apache.org --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 29/9/2003 ------=_NextPart_000_000E_01C38993.2C567FD0--