Abort Edit Issue

Discussion in 'ASP General' started by Mangler, Jan 10, 2007.

  1. Mangler

    Mangler Guest

    I have a SQL stored proc that returns a result of yes if the a record
    exsists. In turn there is a command that calls the proc and passes
    variables when a user inserts data. If the result is yes the insert
    is aborted ( well supposed to be ) I cant seem to get the abort part
    working.

    Command


    <%


    set spDup = Server.CreateObject("ADODB.Command")
    spDup.ActiveConnection = MM_connReclaim_STRING
    spDup.CommandText = "dbo.dup"
    spDup.CommandType = 4
    spDup.CommandTimeout = 0
    spDup.Prepared = true
    spDup.Parameters.Append spDup.CreateParameter("@RETURN_VALUE", 3, 4,3)
    spDup.Parameters.Append spDup.CreateParameter("@rma", 200,
    1,15,spDup__rma)
    spDup.Parameters.Append spDup.CreateParameter("@model", 200,
    1,15,spDup__model)
    spDup.Parameters.Append spDup.CreateParameter("@part", 200,
    1,15,spDup__part)
    spDup.Parameters.Append spDup.CreateParameter("@qty", 200,
    1,15,spDup__qty)
    spDup.Parameters.Append spDup.CreateParameter("@result", 200, 2,15)
    spDup.Execute()
    spDupresult = spDup("@result")
    %>


    If that returns "YES" than abort the insert....


    Dim MM_tableValues
    Dim MM_dbValues


    If (CStr(Request("MM_insert")) <> "") Then


    If spDupresult = "YES" Then
    MM_abortEdit = true


    End If


    ' create the sql insert statement
    MM_tableValues = ""
    MM_dbValues = ""
    For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)


    Can someone help??
     
    Mangler, Jan 10, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. San Diego Guy
    Replies:
    0
    Views:
    571
    San Diego Guy
    Aug 7, 2003
  2. Schultz
    Replies:
    3
    Views:
    581
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 14, 2005
  3. =?Utf-8?B?a2Vu?=
    Replies:
    1
    Views:
    10,372
    Wiktor Zychla [C# MVP]
    Jan 23, 2006
  4. Sharon McCarty
    Replies:
    0
    Views:
    271
    Sharon McCarty
    Nov 24, 2004
  5. Frank Kurka
    Replies:
    8
    Views:
    329
Loading...

Share This Page