Re: Parameter to a Stored Procedure
- From: "wk6pack" <wkwan@xxxxxxxxxx>
- Date: Thu, 30 Jun 2005 09:20:07 -0700
Thanks. I forgot about that.
Will
"William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxxx> wrote in message
news:OXMIWKPfFHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
> 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
> >
> >
>
>
.
- References:
- Parameter to a Stored Procedure
- From: wk6pack
- Re: Parameter to a Stored Procedure
- From: William \(Bill\) Vaughn
- Parameter to a Stored Procedure
- Prev by Date: Re: Prompting for user id/password when using Integrated Security
- Next by Date: Re: Parameter to a Stored Procedure
- Previous by thread: Re: Parameter to a Stored Procedure
- Next by thread: Re: Parameter to a Stored Procedure
- Index(es):
Relevant Pages
|
|