Subject | Re: Question about: SQL error code = -804 Incorrect values within SQLDA structure |
---|---|
Author | gerwinvos |
Post date | 2005-02-02T11:46:32Z |
> this is a typical code set from something which works:adVarChar,
> Set cmd = Server.CreateObject("ADODB.Command")
> Set cmd.ActiveConnection = DBConn
> cmd.CommandText = "newmember"
> cmd.CommandType = adCmdStoredProc
> cmd.Parameters.Append cmd.CreateParameter( "FNAME",
> adParamInput, 50 )("firstname"),1,50)
> cmd.Parameters("FNAME") = MID(Request.Form
> cmd.Parameters.Append cmd.CreateParameter( "LNAME",adVarChar,
> adParamInput, 50 )("lastname"),1,50)
> cmd.Parameters("LNAME") = MID(Request.Form
> cmd.Parameters.Append cmd.CreateParameter( "TITLE",adVarChar,
> adParamInput, 5 )("title"),1,50)
> cmd.Parameters("TITLE") = MID(Request.Form
> <snip>adExecuteNoRecords
>
> cmd.Execute ,, adCmdStoredProc +
> Note: the parameters are typed.the the
> if you do not have adovbs.inc in view then you will need to set
> constants manually.you need
> If the SP returns a result set which appears to be the case, then
> to treat this as a parametised query, not an SPThanks Alan. I used CreateParameter at first as well, but it gave me
> Alan
errors, so I switched to Parameters.Refresh. The only thing which
was different from my code was that I used cmd.Parameters.Append
cmd.CreateParameter(arrColumnNames(lCount), arrColumnTypes(lCount),
adParamInput, arrColumnSizes(lCount), arrValues(lCount)). So I added
the value as the fifth parameter.
Anyway, I havent tried approach yet, but I will give it a try (and
will let you know the results). What still bugs me tho, what does
the error mean and why did I came across so many references to an
old IB bug????