From what is to see of your code, the only explanation I can think of is that your SqlCommand
Cmd
isn't associated with the SqlConnection
GlbSQLCOnn
on which you started the transaction.
The name of your connection,
GlbSQLCOnn
, seems to indicate that it's a "global" connection object. There's no reason to do something like that. Connections to Sql-Server are pooled by default - so you gain nothing by re-using the same connection-object throughout the lifetime of your application. Instead it can become messy quickly (your problem here seems to be a case of that). That's why I suggest you to use any SqlClient-objects only locally.
Pseudo-code:
someMethod()
using connection = new SqlConnection(connectionString)
using transaction = connection.BeginTransaction
using command = new SqlCommand(connection, transaction)
connection.Open
// do something here
transaction.Commit
end using
end method
Even if my assumption from the first paragraph isn't correct, you will solve your problem by sticking to the above "pattern".