SQL Comment Error
I am running SQL Server 2005 SP2 and I am getting an SQL error due to the server not recognizing the "--" as a comment. (I am using the 32-bit version) The same code runs on SQL Server 2000 with no problem.
Is there a setting to correct this? Did I not install 2005 correctly? Do I need to install the cumulative update pkg 3 to correct this problem?
Here is the code:
<cfquery name="#attributes.output#" datasource="#request.dsn#">
-- Retrive the product archive record
select *
from dbo.api_userArchive
where isActive = 1
Here is the error msg:
Error Diagnostic Information
SQL operation unrecognized
The SQL operation you specified is unrecognized (only SELECT, INSERT, UPDATE, DELETE, and CALL are supported).
SQL = '-- Retrive the product archive record select * from dbo.api_userArchive where isActive = 1'
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (27:3) to (27:65).
The error occurred while processing an element with a general identifier of (CFRETHROW), occupying document position (281:11) to (281:21).
Date/Time: 09/10/07 19:05:09
Browser: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)
Remote Address: 127.0.0.1
|