Re: Parameter to a Stored Procedure
- From: "Daniel Crichton" <msnews@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 16:31:43 +0100
wk6pack wrote on Wed, 29 Jun 2005 12:17:31 -0700:
> Hi,
>
> I'm getting this error 3708 Parameter object is improperly defined
>
> I'm calling a stored procedure from vb asp and setting a few parameters.
> If I comment out the error line it works fine. how many parameters can I
> pass to a stored procedure?
>
> here is the code.
>
> set cmd = CreateObject("ADODB.Command")
> set rs = CreateObject("ADODB.Recordset")
> dim strSQL
>
> Set cmd.ActiveConnection = cn
>
> lservicedate = Year(lservicedate) & "-" & Month(lservicedate) & "-" &
> Day(lservicedate)
> cmd.CommandText = "InsertVSIS"
> cmd.CommandType = adCmdStoredProc
> cmd.Parameters.Append cmd.CreateParameter("@studentkey", adInteger,
> adParamInput,,lstudentkey)
> cmd.Parameters.Append cmd.CreateParameter("@servicedate",adDBTimeStamp,
> adParamInput,,lservicedate)
> cmd.Parameters.Append cmd.CreateParameter("@serviceid", adChar,
> adParamInput,,lserviceid ) <====error here
Bill Vaughn posted the fix for your issue. However, I just wanted to point
out that adDBTimeStamp might give you issues if you are using this with
Access (and possibly other databases such as DB2), consider using adDate
instead.
Dan
.
- Follow-Ups:
- Re: Parameter to a Stored Procedure
- From: wk6pack
- Re: Parameter to a Stored Procedure
- References:
- Parameter to a Stored Procedure
- From: wk6pack
- Parameter to a Stored Procedure
- Prev by Date: Re: multi recordset error?
- Next by Date: Re: should I close connection?
- Previous by thread: Re: Parameter to a Stored Procedure
- Next by thread: Re: Parameter to a Stored Procedure
- Index(es):
Relevant Pages
|
|