Re: Parameter to a Stored Procedure
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxxx>
- Date: Wed, 29 Jun 2005 14:36:17 -0700
You can pass as many Parameters are defined for the SP plus one (the
ReturnValue).
In your case when you specify a string datatype like Char or VarChar, you
must specify the length in the Parameter definition.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"wk6pack" <wkwan@xxxxxxxxxx> wrote in message
news:eO2xD8NfFHA.3848@xxxxxxxxxxxxxxxxxxxxxxx
> 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
>
> cmd.execute.
>
> thanks,
> Will
>
>
.
- 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: Which Error object
- Next by Date: HOW DO I EDIT A RECORD IN ADO
- Previous by thread: Parameter to a Stored Procedure
- Next by thread: Re: Parameter to a Stored Procedure
- Index(es):
Relevant Pages
|
|