Question : Testing if a Transaction is open

I'm trying to us @@Trancount to  test if a Transaction is open,  so if necessary I can roll it back in my error vb handler. My problem is that it always returns zero

Public Function TransactionBegun() As Boolean
   
    Dim RS As New ADODB.Recordset
   
    RS.Open "Select @@Trancount as TransactionCount", DatabaseConnection
       
    If RS.EOF = False Then
        If RS![TransactionCount] > 0 Then
            TransactionBegun = True
        End If
    End If
End Function

This function always returns FALSE. I've stepped through it, and RS![TransactionCount] is always zero.

What am I doing wrong? And yes, I am beggining a transaction before i call this procedure

Answer : Testing if a Transaction is open

Hi Molly,

yes if you got the possibility to use the management tools (no matter if its the command line interface or the web interface). If so let me know - if you wanna learn more on your own, try this link:

http://support.3com.com/infodeli/tools/switches/4500/3Com_Switch_4500_Quick_Reference_Guide.pdf

best regards,

Lenin
Random Solutions  
 
programming4us programming4us