petdance/bobby-tables

Named parameters in ASP

Closed this issue · 4 comments

Hi!
As far as I am aware (and able to test) ASP (classic) does not support named parameters, so the example on the page will not work.
In ASP, you use questionmarks, in place of parameternames in the query.

Working example.
(note ?-marks as placeholders, which also means, that the order of the parameter-declarations becomes important.)

objCmd.CommandType = adCmdText;
objCmd.CommandText = "UPDATE members SET photo = ? WHERE memberID = ?";
objCmd.Parameters.Append(objCmd.CreateParameter("filename", adVarChar, adParamInput, 510, fileName));
objCmd.Parameters.Append(objCmd.CreateParameter("memberID", adInteger, adParamInput, 4, memberid ));
objCmd.Execute(adExecuteNoRecords);

Thanks very much for this. I've updated the page. If you'll give me your name, and an optional URL to link to, I'll add you to the Thanks on the front page.

Hey!
No problem!

My full name is "Kim Christensen", and my url is www.smukkekim.dk

Kim

On Mon, Apr 16, 2012 at 16:03, Andy Lester <
reply@reply.github.com

wrote:

Thanks very much for this. I've updated the page. If you'll give me your
name, and an optional URL to link to, I'll add you to the Thanks on the
front page.


Reply to this email directly or view it on GitHub:
#26 (comment)