Colin,
Seems like I remember that error being caused by the wrong datatype. ie
Trying to enter numeric data in a text field or vice versa..
Looking you variables. Some questions come to mind.
user_customer_id -- is that a varchar? is it an identity field? I would
expect an error here if you are trying to insert a value into an identity
field.
user_canbedeleted and user_enabled bit fields are going to be required
fields are you passing
1 or 0 to these fields.
I usually set a default value in the table for bit fields either 0 or 1.
Jeff Craig
----- Original Message -----
From: "Colin Robinson" <[EMAIL PROTECTED]>
To: "SQL" <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 4:31 AM
Subject: RE: ODBC Error Code = 07001 (Wrong number of parameters)
> The stored procedure works fine from query analyser and changing
> the cfsqltype does not appear to help.
>
> Any other suggestions ?
>
> TIA
>
> Colin
>
> > -----Original Message-----
> > From: Correa, Orlando (ITSC) [mailto:[EMAIL PROTECTED]]
> > Sent: 19 July 2001 22:48
> > To: SQL
> > Subject: RE: ODBC Error Code = 07001 (Wrong number of parameters)
> >
> >
> > 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