Results 1 to 2 of 2

Thread: [RESOLVED] Stored Procedure Error

Hybrid View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2001
    Posts
    759

    Resolved [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.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width