Re: Parameter to a Stored Procedure



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


.



Relevant Pages

  • Re: returning multiple recordsets from VB to ASP
    ... stored procedure and into an intermediate VB DLL: ... more awkward to do in SQL than in VB and the stored procedure is getting ... The ASP page anways puts the data into arrays, ...
    (microsoft.public.data.ado)
  • Connection.Execute and SQL stored procedures
    ... ..asp, the connection object and MS SQL Server as the DB can help me out. ... Five of the six calls execute as expected. ... This particular stored procedure does quite a bit of work within the DB, ...
    (microsoft.public.sqlserver.odbc)
  • Re: i wanna help in deling sql server 2000
    ... you can encapsulate it in a stored procedure? ... The nice thing about having the SQL in the ASP page is that you don't ... by a client once in a blue moon. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Concern with using Stored Procedure with ASP
    ... > server memory using DIM statements to be used in conjunction with the ... > Stored procedure (for example, I have an asp calendar from which a ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: SqlXML using soap
    ... It might be a similar credentials issue. ... with the credentials of the process running ASP, ... > The web service is calling a stored procedure which returns "Fnames" ... > I am calling the procedure like this. ...
    (microsoft.public.sqlserver.xml)