S
SamyCode
Guest
I have a method that defines the values of those properties. It looks like this:
Private sqlDbConn As SqlConnection
Private sqlCmd As SqlCommand
Private dbConnStr As String = getDbConnStr(10)
Private trans As SqlTransaction
I have a method that defines the values of those properties. It looks like this:
sqlDbConn = New SqlConnection(dbConnStr)
sqlCmd = New SqlCommand
sqlCmd.Connection = sqlDbConn
sqlDbConn.Open()
trans = sqlDbConn.BeginTransaction()
But then, when I call another method inside the same asmx from within the method that defines the values of those properties, every property stays with it's value, except trans. Trans value turns to nothing, it turns to null. I need this transaction in order to pass it to the adapter of the other method, because all the calls to the database between these two methods needs to be in the same transaction.
What's wrong? Why my trans variable turns to nothing (null)??
Help!! Thank you!
Continue reading...
Private sqlDbConn As SqlConnection
Private sqlCmd As SqlCommand
Private dbConnStr As String = getDbConnStr(10)
Private trans As SqlTransaction
I have a method that defines the values of those properties. It looks like this:
sqlDbConn = New SqlConnection(dbConnStr)
sqlCmd = New SqlCommand
sqlCmd.Connection = sqlDbConn
sqlDbConn.Open()
trans = sqlDbConn.BeginTransaction()
But then, when I call another method inside the same asmx from within the method that defines the values of those properties, every property stays with it's value, except trans. Trans value turns to nothing, it turns to null. I need this transaction in order to pass it to the adapter of the other method, because all the calls to the database between these two methods needs to be in the same transaction.
What's wrong? Why my trans variable turns to nothing (null)??
Help!! Thank you!
Continue reading...