1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2016
    Rep Power

    Execute a stored procedure in Classic ASP (Dreamweaver)


    I am building a webpage in Dreamweaver CS6, using Class ASP and everything works fine other than my SQL Stored Procedure does not work.

    This is my code,

    If Request("USP") <> "" Then
    set commandExportProduct = Server.CreateObject("ADODB.Command")
    commandExportProduct.ActiveConnection = MM_PSCRM_STRING
    commandExportProduct.CommandText = "execute dba.sp_product_export @prod = vProdref"
    commandExportProduct.Parameters.Append commandExportProduct.CreateParameter("vProdref", 200, 1,25,commandExportProduct__prod)
    commandExportProduct.CommandType = 4
    commandExportProduct.CommandTimeout = 0
    commandExportProduct.Prepared = true
    End If
    I don't appear to get any errors, but I know the stored procedure isn't running as the stored procedure spits out a txt file.

    Am I missing something?
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Rep Power
    Review your code to verify you don't have an "On error resume next" statement somewhere above your db call, if you do it may hide errors from you.

    Otherwise, I don't know. I used to use lots of sp's with sql server but it's been years, and I don't seem to have any old code available on any of my machines, sorry.
    Doug G
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo