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: "Lukasz Szybalski" <szybalski AT gmail.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] unixodbc and openoffice
  • Date: Mon, 11 Feb 2008 10:34:38 -0600

On Feb 11, 2008 3:00 AM, ZIGLIO, Frediano, VF-IT
<Frediano.Ziglio AT vodafone.com> 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.
That worked. Is there a way to set it in some default configuration
file? What would it be called? Where?

Lucas

>
> > I am using debian stable with freeTDS.
> > I Followed this page on how to setup unixODBC and freeTDS:
> > http://lucasmanual.com/mywiki/unixODBC
> >
> > Lucas
> >
>
> debian stable is quite old... we released 0.64 on July 2006.
>
> freddy77
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



--
Vehicle Information Number. Check for Authentic VIN
http://lucasmanual.com/vin
TurboGears Documentation:
http://www.lucasmanual.com/mywiki/TurboGears




Archive powered by MHonArc 2.6.24.

Top of Page