Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compatibility & PreserveSingleQuotes

Status
Not open for further replies.

fholler

Programmer
Apr 20, 2001
3
FR
Hi!
The clients of my site get an error message with IE 5.0
and IE 5.5. This is due to the following query :

<cfquery datasource=&quot;...&quot;name=&quot;match&quot;>
Select Propert
From PropertyMaster
Where RoommateCode IN (#PreserveSingleQuotes(Variables.MatchCode)#)
</cfquery>

The error message is :

Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 3: Incorrect syntax near
')'.


Data Source = &quot;...&quot;

SQL = &quot;Select * From PropertyMaster Where RoommateCode IN () &quot;

But Variables.MatchCode = 'lionking','cabrera'
So apparently, this is a compatibilty problem, because everything works fine with my browser.
Do U know what I can do to avoid this problem?
Thanks
Fabien
 
Hey Fabien,

That part of the code is almost entirely browser independent so I don't think it's a compatibility problem. About the only thing the browser could affect is the variable &quot;mathcode&quot; if it's passing form variables or url variables that are used to create this variable.

Can you post the code where you create the variable &quot;mathcode&quot;? Also, try replacing &quot;#PreserveSingleQuotes(Variables.MatchCode)#&quot; with a hard coded value of &quot;'lionking','cabrera'&quot; and see what happens.

GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top