[RESOLVED] Stored Procedure Error
How come this snippet of code works fine in VB6, however, when I run it in ASP I get the following error message?
Code:
.Parameters.Append .CreateParameter("@State", adVarChar, adParamInput, 25, "Arizona")
Error Message.
[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'CheckState' expects
parameter '@State', which was not supplied.
Inside the stored procedure I have a parameter called @State.
Am I adding a new parameter to the already existing parameter? I'm confused and any help would be appreciated. Thank you.
Re: Stored Procedure Error
ASP does not allow references, so the constants/enum's (like adVarChar and adParamInput) are not declared - you will need to declare them yourself, or use the equivalent values instead.
To see a declaration for a constant, find/type it in a VB6 code window, then right-click and select "Definition". It should open the Object Browser with the item highlighted, and at the bottom of the screen have a Const declaration for it.
If doing that doesn't solve it, show us a bit more of the code.