Skip to Content.
Sympa Menu

freetds - Re: [freetds] unixodbc and openoffice

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] unixodbc and openoffice
  • Date: Wed, 12 Mar 2008 14:48:26 -0400

Lukasz Szybalski wrote:
> > > > 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)")
> > >
> > > 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?

In later versions, the driver is hard-coded to send "SET QUOTED_IDENTIFIER
ON" to the server as soon as the connection is established. (I didn't
check the source code, but I think that's what Frediano meant.)

There's no config file setting. You can set it yourself by sending that
string at any time between opening the connection and sending the query.
You don't even have to send it as a separate batch; this would work:

SET QUOTED_IDENTIFIER ON select * from "tablename"

Cf. documentation for "SET" for more.

Naturally, I recommend 0.82RC2, soon to be RC3, instead. :-)

HTH.

--jkl






Archive powered by MHonArc 2.6.24.

Top of Page