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

Running a stored procedure through coldfusion

Status
Not open for further replies.

shez

Programmer
Joined
Feb 22, 2002
Messages
10
Location
GB
I am trying to run a stored procedure with 3 input parameters and 1 output parameter and am getting the following error message:

"Error Diagnostic Information
ODBC Error Code = 07001 (Wrong number of parameters)
[Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error
Hint: The cause of this error is usually that your query contains a reference to a field which does not exist. You should verify that the fields included in your query exist and that you have specified their names correctly.

SQL = "sp_contra_replace"
Data Source = "ndexplus"
The error occurred while processing an element with a general identifier of (CFSTOREDPROC), occupying document position (37:2) to (37:76).
Date/Time: 02/22/02 15:20:35
Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Remote Address: 192.168.111.173
HTTP Referer:
This is the code I am using to do this:


<cfloop index=&quot;unpostedUSM&quot; list=&quot;#form.unpost#&quot;>
<cfset lpsoNo = ListGetAt(unpostedUSM, 1, &quot;;&quot;)>
<cfset LpsoDate = ListGetAt(unpostedUSM, 2, &quot;;&quot;)>
<cfset LpsoVersion = ListGetAt(unpostedUSM, 3, &quot;;&quot;)>
<cfset LpsoSeq = ListGetAt(unpostedUSM, 4, &quot;;&quot;)>
<cfset flag = 0>

#LPSONO#
#LpsoDate#
#LpsoVersion#
<cfstoredproc DATASOURCE=&quot;#application.dsn#&quot; PROCEDURE=&quot;sp_contra_replace&quot;>
<cfprocparam type=&quot;IN&quot; value=&quot;#LPSONO#&quot; cfsqltype=&quot;CF_SQL_BIGINT&quot;>
<cfprocparam type=&quot;IN&quot; value=&quot;#LpsoDate#&quot; cfsqltype=&quot;CF_SQL_DATE&quot;>
<cfprocparam type=&quot;IN&quot; value=&quot;#LpsoVersion#&quot; cfsqltype=&quot;CF_SQL_BIGINT&quot;>
<cfprocparam type=&quot;IN&quot; value=&quot;#LPSOSEQ#&quot; cfsqltype=&quot;CF_SQL_BIGINT&quot;>
<cfprocparam type=&quot;OUT&quot; variable=Flag cfsqltype=&quot;CF_SQL_BIGINT&quot;>
</cfstoredproc>
</cfloop>

Can you see what I am doing wrong please????

Cheers,
Shez
 
Shez,

You said you were using 3 parameters IN, 1 OUT, but I see 4 IN, 1 OUT.

Check this first....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top