[unixODBC-support] unixodbc and openoffice

Lukasz Szybalski szybalski at gmail.com
Mon Feb 11 17:26:03 GMT 2008


On Feb 9, 2008 1:33 PM, Nick Gorham <nick.gorham at easysoft.com> wrote:
> Lukasz Szybalski 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?
> >Lucas
> >
> >
> >
> >
>
> Hi,
>
> I don't know. I just checked and the use of quotes around names are
> perfectly legal in SQL Server, maybe its a freeTds thing, maybe ask the
> freeTDS folk.

I need to add a "SET QUOTED_IDENTIFIER ON" before select. Newer
version of freeTDS should set this flag during logon.

Is there a way to set this option globally somewhere in unixODBC?

Lucas



More information about the unixODBC-support mailing list