Subject Re: Question about: SQL error code = -804 Incorrect values within SQLDA structure
Author gerwinvos
> this is a typical code set from something which works:
> Set cmd = Server.CreateObject("ADODB.Command")
> Set cmd.ActiveConnection = DBConn
> cmd.CommandText = "newmember"
> cmd.CommandType = adCmdStoredProc
> cmd.Parameters.Append cmd.CreateParameter( "FNAME",
adVarChar,
> adParamInput, 50 )
> cmd.Parameters("FNAME") = MID(Request.Form
("firstname"),1,50)
> cmd.Parameters.Append cmd.CreateParameter( "LNAME",
adVarChar,
> adParamInput, 50 )
> cmd.Parameters("LNAME") = MID(Request.Form
("lastname"),1,50)
> cmd.Parameters.Append cmd.CreateParameter( "TITLE",
adVarChar,
> adParamInput, 5 )
> cmd.Parameters("TITLE") = MID(Request.Form
("title"),1,50)
> <snip>
>
> cmd.Execute ,, adCmdStoredProc +
adExecuteNoRecords
> Note: the parameters are typed.
> if you do not have adovbs.inc in view then you will need to set
the the
> constants manually.
> If the SP returns a result set which appears to be the case, then
you need
> to treat this as a parametised query, not an SP
> Alan

Thanks Alan. I used CreateParameter at first as well, but it gave me
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????