Duplicated SQL transactions from .NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jennyfer Barco

    #1

    Duplicated SQL transactions from .NET

    Hello, I'm expiriencing something weird, once in a while I have duplicated
    transactions because it looks like a stored procedure is being executed
    twice from .NET. When this happens I get 2 record transactions which is
    incorrect, but doesn't happen all the time. Here is the example of how I'm
    invocating the sp:
    SQL = "sp_w_PickQ ty '" & UCase(vIncoming ) & "','" & genparams(0)
    & "'"
    mytrans =
    vSQLConn.BeginT ransaction(Isol ationLevel.Read Committed, "TransPick" )
    mySqlCmd1.Conne ction = vSQLConn
    mySqlCmd1.Trans action = mytrans
    mySqlCmd1.Comma ndText = SQL
    mySQLDA.SelectC ommand = mySqlCmd1
    mySQLDA.Fill(my SQLDS)
    mytable = mySQLDS.Tables( 0)
    myrow = mytable.Rows(0)

    Select Case myrow("result")
    Case "1" 'Everything OK....

    End Select
    mytrans.Commit( )

    When I'm tracing the program I only call it once and the diference on time
    between the 2 transactions is milisenconds, so it's imposible that the users
    is sending the transaction twice


Working...