Re: Parameter to a Stored Procedure



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
> >
> >
>
>


.



Relevant Pages

  • Re: Parameter to a Stored Procedure
    ... In your case when you specify a string datatype like Char or VarChar, ... > I'm calling a stored procedure from vb asp and setting a few parameters. ...
    (microsoft.public.data.ado)
  • Re: Was Create Stored Procedure wizard droped from SQL Server 2005
    ... In SQL server 2005 management studio, you can use the "Specify Values for ... connect to an instance of SQL Server 2005 Database ... Right-click Stored Procedures, and then click New Stored Procedure. ... click Specify Values for Template Parameters. ...
    (microsoft.public.sqlserver.tools)
  • Re: Exec Stored procedure issue.
    ... You can't pass an expression as a stored procedure parameter; ... Since you are building a SQL statement string ... appears the easiest method is to specify the parameter as a ... supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.sqlserver.programming)
  • Re: runtime error 800a01a8
    ... > results from the stored procedure. ... > form and how do I specify that I want the input parameter to be taken ... > dim dbcn, dbrs, byclassnoprice ... > Set objParam = byclassnoprice.CreateParameter ...
    (microsoft.public.inetserver.asp.db)
  • Hitting Sql Server Stored Procedure Breakpoint from ASP.NET app
    ... I am not able to stop at a stored procedure breakpoint in SQL Server from an ... ASP.NET application unless I specify a username and password in my connection ... different user in DB connection string. ... debugging rights in SQL Server? ...
    (microsoft.public.dotnet.framework.aspnet)