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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling MSSQL SP with named notation

Status
Not open for further replies.

gasparrelli

Programmer
Sep 13, 2000
24
US
Hi! I am having some trouble trying to make code reusable: I have built stored procs in SQL to insert, update and perform other functions based on what variables get passed to them. The trouble that I'm having is that when I use cfprocparam ans specify the variable name using dbvarname, what CF finally passes to the server omits the variable name and only passes a series of variables.

In other words I call an SP called UpdCity with CFStoredProc, and include the following procparam:

<cfprocparam type=&quot;In&quot; cfsqltype=&quot;CF_SQL_CHAR&quot; value=&quot;#form.city#&quot; dbvarname=&quot;@city&quot; null=&quot;No&quot;>
What SQL finally gets is something akin to:

UpdCity Sacramento

Rather than the desired:

UpdCity @city=Sacramento

Anyone know why this is happening? Is it something I am doing wrong in the CF call or perhaps a problem with my ODBC driver? I can cut my number of SP's and lines of code to a fraction of what they would otherwise be if I can call them with named notation.

Any help is greatly appreciated on this as I am under a tight deadline and am new to using CF. Thanks!!! [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top