Passing Parameters to a Stored Procedure using ASP

前端 未结 3 956
别跟我提以往
别跟我提以往 2020-11-30 15:53

I\'m trying to pass some parameters to a SQL stored procedure in my classic ASP. I\'ve seen several posts on this and not sure what I\'m doing wrong as I don\'t seem to see

3条回答
  •  情话喂你
    2020-11-30 16:10

    @KekuSemau is correct but let me a suggest a more efficient and manageable approach then using the adovbs constants file.

    METADATA allows you to define a reference to the DLLs constants even if your using Late Binding as is the case in a Classic ASP environment. It's probably worth mentioning that you can add METADATA references in individual pages but then again why would you?

    To use it simply add the METADATA tag to your global.asa file (should be located in the root of your Web Application).

    
    

    Depending on the system the ADO Type Library maybe different, adjust the FILE attribute accordingly.

    I use this approach in all my applications mainly for referencing constants in the ADO and CDO Type Libraries.

    ADO Type Library

    
    

    CDO Type Library

    
    

    These are examples of my own personal references, file locations maybe different whereas UUID attributes should be exactly the same.

    IMPORTANT:

    Remember to remove any references to adovbs constant include file (adovbs.inc or adovbs.asp commonly) when using METADATA approach in your global.asa or you will get a

    Name redefined error
    

    Also METADATA is only available in IIS 4.0 and above.


    Useful Links

    • Using METADATA to Import DLL Constants (Recommended reading)

提交回复
热议问题