Skip to Content.
Sympa Menu

freetds - RE: [freetds] Config or environment setting for toggling quoted i dentifiers setting

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Config or environment setting for toggling quoted i dentifiers setting
  • Date: Mon, 23 Jun 2003 17:26:24 -0400

> From: Mark Gruetzner [mailto:mgruetzner AT rw3.com]
> Sent: June 23, 2003 4:30 PM
>
> Is there a configuration option I can specify in freetds.conf or as an
> environment variable whereby I can specify the equivalent of:
>
> SET QUOTED_IDENTIFIERS OFF
>
> When using tds version= 7.0 for connecting to MS SQL Server 7.0.

No, there's no such option. But you might have found a bug. Which library
are you using?

Microsoft's db-lib defaults to SET QUOTED_IDENTIFIER OFF; their ODBC
defaults to ON. tsql defaults to OFF:

1> sp_dboption 'test', 'quoted identifier'
2> go
OptionName CurrentSetting
quoted identifier off

I find no code to affect our default in any of our libraries (meaning, our
ODBC default setting should be ON, but if it is, I don't know how it
happens). Our include/sybdb.h doesn't even mention DBQUOTEDIDENT.

It may be that libtds simply reflects the database's default, rather than
forcing it one way or the other in accordance with the docs. It would very
strange, though, for the same database to exhibit different defaults
depending on the protocol version. Is that what you're seeing?

But.... All "set QUOTED_IDENTIFIER OFF" would do is disallow quoted
identifiers, such that "select * from [my table]" would be invalid. Just
curious, how is that better for you?

--jkl

P. S. Idea: freetds.conf currently controls one default option, "text
size". Perhaps it should support a "setup query" instead, an arbitary
string that would be sent for every new connection. That way, Mark could
have:

setup = "set textsize 1024 set QUOTED_IDENTIFIER OFF"

or whatever he wanted.



-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.






Archive powered by MHonArc 2.6.24.

Top of Page