SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Quoted Identifiers in SQL Server 2000
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 12/10/2000 :  14:00:37  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
Quoted identifiers are used by default in SQL Server 2000, that is, they are set to ON. This is different from SQL Server 7.0 where they were set to OFF by default. Read on to see what this means for you.

Article Link.

diver
Starting Member

2 Posts

Posted - 10/01/2002 :  10:58:10  Show Profile  Reply with Quote
Great article. This article confirmed all of the trouble I was having, especially since the SQL Server 7 guys could not see the problem. The only downside I can see here... is that there is no mention of reserved words. I am now experiencing a situation where one of my passed in parameters to build the SQL Statement is equal to 'IN' (Indiana), and it errors out. The dillema, is that Microsofts method for setting the QUOTED_IDENTIFIER off from the ADO connection object does not work... so I'm stuck. Don't really know of a workaround on that one yet. All advice is appreciated!

Thanks.

Go to Top of Page

robvolk
Most Valuable Yak

USA
15678 Posts

Posted - 10/01/2002 :  12:20:09  Show Profile  Visit robvolk's Homepage  Reply with Quote
The easiest way to avoid problems with quoted identifiers is to ensure you ONLY use single quotes to delimit strings...ALWAYS. That way you never have to worry about whether QUOTED_IDENTIFIER is on or off. You can also go further and only use square brackets [ ] to delimit object names and identifiers. If you do both of these, then you ensure that any double quote character (") is always part of a data value and has no kind of syntactical significance that can be misinterpreted by SQL Server.

Edited by - robvolk on 10/01/2002 12:20:32
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000