• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

params not getting passed using stored procedures

Participant ,
Feb 27, 2008 Feb 27, 2008

Copy link to clipboard

Copied

I have a very strange situation going on on my production server. We decided to use all stored procedures for this application and we built it in development using WIN2000, ColdFusion MX 7 version 7,0,2,142559 and SQL Server 2000 SP4.

Everything worked wonderfully in development. We moved it to our production server which is running WIN2003, ColdFusion MX 7 version 7,0,2,142559 and SQL Server 2000 SP4. When we try and run stored procedures that are passing params to the stored procedures. We get the same error. Does anyone have any idea why those params are not being processed on our production server? I can take the same code and it works fine on development. Stored procedures that are only doing select statements work fine.

[Macromedia][SQLServer JDBC Driver][SQLServer]Line 1: Incorrect syntax near '='.

The error occurred in D:\cfsites\jobapps\test.cfm: line 29

27 : <cfstoredproc procedure="dbo.validateAdmin" datasource="XXXXXXXX ">
28 : <cfprocresult name="result" resultset="1">
29 : <cfprocparam type="in" cfsqltype="cf_sql_varchar" dbvarname="username" value="7EC7A68326E4A1D2AD64D6F2A713ED43">
30 : </cfstoredproc>
31 : <cfdump var="#result#">



--------------------------------------------------------------------------------

SQL {call dbo.validateAdmin(username = (param 1) )}
DATASOURCE XXXXXXXX
VENDORERRORCODE 170
SQLSTATE HY000


TOPICS
Advanced techniques

Views

630

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 28, 2008 Feb 28, 2008

Copy link to clipboard

Copied

This problem is solved and the way to solve it is to pass dbvarname="@username" I get this behavior on a Windows 2003 machine not a Windows 2000 machine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 28, 2008 Feb 28, 2008

Copy link to clipboard

Copied

> This problem is solved and the way to solve it is to pass dbvarname="@username" I get this behavior on a Windows 2003 machine not a Windows 2000 machine.

dbvarname is not supported in CF any more. From memory, the history is
something like this:

CF5: supported
CFMX6: not supported
CFMX7-7.0.1: not supported
CFMX7.0.2: supported <----
CF8: not supported

There was one patch that brought support back, and it was there in the CF8
beta, but was removed again before release.

If you're finding this to work, it's coincidence, not design. Don't rely
on it.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_14.html

--
Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 28, 2008 Feb 28, 2008

Copy link to clipboard

Copied

I have been reading back and forth through documentation about the dbvarname param and I would like to know which updates in ColdFusion MX 7.0.2 took away the dbvarname param because I stll have it available on my production box and I would like to apply the appropriate patch to disable it. So, what patch do I need to apply to do that?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Feb 28, 2008 Feb 28, 2008

Copy link to clipboard

Copied

LATEST
quote:

Originally posted by: cutie369
I have been reading back and forth through documentation about the dbvarname param and I would like to know which updates in ColdFusion MX 7.0.2 took away the dbvarname param because I stll have it available on my production box and I would like to apply the appropriate patch to disable it. So, what patch do I need to apply to do that?


The dbvarname was removed starting at CFMX 6
http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFu...

It is enabled again in Cumulative Hot Fix 1 for CF7.0.2
http://kb.adobe.com/selfservice/viewContent.do?externalId=kb400074&sliceId=1

I assume that if you do not wish for this feature you should not install the hotfix.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation