Re: unixodbc and openoffice

"Lukasz Szybalski" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Mon, Feb 11, 2008 at 11:34 AM, Lukasz Szybalski <[email protected]> wrote:
> On Feb 11, 2008 3:00 AM, ZIGLIO, Frediano, VF-IT
>
>
> <[email protected]> wrote:
>  > >
>  > > Hello,
>  > > I have a problem connecting to mssql from openoffice.
>  > > I keep getting this error:
>  > >
>  > > SQL Status: 42000
>  > > Error code: 170
>  > > [FreeTDS][SQL Server]Line 1: Incorrect syntax near 'auto_mydb_007'.
>  > > The SQL command leading to this error is:
>  > > SELECT * FROM "auto_mydb_007"."db0"."D1234"
>  > >
>  > > for some reason the quotation gives a problem.
>  > >
>  > > In python app:
>  > > File "mssql.py", line 4, in ?
>  > >     cursor.execute('''SELECT * FROM "auto_mydb_007"."db0"."D1234''')
>  > > <type 'instance'>: ('42000', "[42000] [FreeTDS][SQL Server]Line 1:
>  > > Incorrect syntax near 'auto_mydb_007'. (170)")
>  > >
>  > > but if I remove "
>  > > 'SELECT * FROM auto_mydb_007.db0.D1234'
>  > > Everything works just fine on a command line.
>  > >
>  > > but in openoffice if I create a custom query I still get this errors.
>  > >
>  > > The SQL command leading to this error is:
>  > > SELECT * FROM auto_mydb_007.db0.D1234;
>  > >
>  > >
>  > > Any idea why this might be? Is there a setting that deals with "
>  > > quotations? Or is this some other problem?
>  > >
>  >
>  > Try adding a "SET QUOTED_IDENTIFIER ON" before select. Newer version
>  > should set this flag during logon.


You said newer version sets it as a default.... does it set it in some
kind of config file? Can I set it myself?
Lucas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.