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

    Join Date
    Jan 2016
    Posts
    16
    Rep Power
    0

    Execute a stored procedure in Classic ASP (Dreamweaver)


    Hi

    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,

    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
    commandExportProduct.Execute()
    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
    Posts
    14,529
    Rep Power
    4541
    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