If you can call the sp from query analyzer and it works fine... you might
want to see if changing the CFSQLTYPE from CFSQLTYPE="CF_SQL_VARCHAR" to
CFSQLTYPE="CF_SQL_LONGVARCHAR" on @user_question helps any...
-----Original Message-----
From: Colin Robinson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 7:17 AM
To: SQL
Subject: ODBC Error Code = 07001 (Wrong number of parameters)
I can't see the wood for the trees ! I can not seem to work out why I am
getting the error message below. I have included the error message the
stored procedure and the code, if anyone can see the mistake I have made it
would be much appreciated.
Colin
<----- error message --------->
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.
<----- The stored procedure --------->
CREATE PROCEDURE insertusers
( @user_forename [varchar](50),
@user_surname [varchar](50),
@user_email [varchar](50),
@user_customer_id [varchar](50),
@user_username [varchar](50),
@user_password [varchar](50),
@user_question [varchar](500),
@user_answer [varchar](50),
@user_enabled [bit],
@user_created [datetime],
@user_canbedeleted [bit],
@user_grouplevel [int]
)
AS INSERT INTO users ( user_forename,
user_surname,
user_email,
user_customer_id,
user_username,
user_password,
user_question,
user_answer,
user_enabled,
user_created,
user_canbedeleted,
user_grouplevel
)
VALUES ( @user_forename,
@user_surname,
@user_email,
@user_customer_id,
@user_username,
@user_password,
@user_question,
@user_answer,
@user_enabled,
@user_created,
@user_canbedeleted,
@user_grouplevel
)
<----- The coldfusion code --------->
<cfstoredproc datasource="mline" procedure="insertusers" returncode="yes"
debug>
<cfprocparam null="no" cfsqltype="cf_sql_varchar"
dbvarname="@user_forename" type="In" value="#attributes.value1#">
<cfprocparam null="no" cfsqltype="cf_sql_varchar"
dbvarname="@user_surname"
type="In" value="#attributes.value2#">
<cfprocparam null="no" cfsqltype="cf_sql_varchar"
dbvarname="@user_email"
type="In" value="#attributes.value3#">
<cfprocparam null="no" cfsqltype="cf_sql_varchar"
dbvarname="@user_customer_id" type="In" value="#attributes.value4#">
<cfprocparam null="no" cfsqltype="cf_sql_varchar"
dbvarname="@user_username" type="In" value="#attributes.value5#">
<cfprocparam null="no" cfsqltype="cf_sql_varchar"
dbvarname="@user_password" type="In" value="#attributes.value6#">
<cfprocparam null="no" cfsqltype="cf_sql_varchar"
dbvarname="@user_question" type="In" value="#attributes.value7#">
<cfprocparam null="no" cfsqltype="cf_sql_varchar"
dbvarname="@user_answer"
type="In" value="#attributes.value8#">
<cfprocparam null="no" cfsqltype="cf_sql_bit"
dbvarname="@user_enabled"
type="In" value="#attributes.value9#">
<cfprocparam null="no" cfsqltype="cf_sql_date"
dbvarname="@user_created"
type="In" value="#attributes.value10#">
<cfprocparam null="no" cfsqltype="cf_sql_bit"
dbvarname="@user_canbedeleted" type="In" value="#attributes.value11#">
<cfprocparam null="no" cfsqltype="cf_sql_integer"
dbvarname="@user_grouplevel" type="In" value="#attributes.value12#">
</cfstoredproc>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists