[freetds] Config or environment setting for toggling quoted i dentifiers setting
Lowden, James K
LowdenJK at bernstein.com
Mon Jun 23 17:26:24 EDT 2003
> 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'
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?
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
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.
More information about the FreeTDS