Re: Parameter to a Stored Procedure



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
    ... > ReturnValue). ... > In your case when you specify a string datatype like Char or VarChar, ... > must specify the length in the Parameter definition. ... >> I'm calling a stored procedure from vb asp and setting a few ...
    (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: byte data type
    ... >C does not specify the number of bits to a char. ... Java went with the signed tradition even though nowadays 99% of the ... Perhaps sun hardware is signed byte only. ...
    (comp.lang.java.programmer)
  • 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)