M
Mechanic
I am trying to use Transactions in conjunction with Ajax and mutable
pages. I am supposed to have the user complete the entire process
before any data is committed to the database. Does anyone have any
idea if this is possible? I am using CommittableTransaction in the
"GetContainer". It seems to me their should be a way to get a guid
from the Transaction and then use that guid on the next page to pick
the Transaction back up on the asynchronous postback.
I found pages like this http://msdn2.microsoft.com/en-us/library/system.transactions.enlistme...
it does not seem to cover this. Any help would be appreciated.
Dim factory As DbProviderFactory =
DbProviderFactories.GetFactory("Oracle.DataAccess.Client")
Dim Connection As DbConnection =
factory.CreateConnection()
Connection.ConnectionString = constr
Dim cmd As DbCommand = factory.CreateCommand()
Try
Connection.Open()
Connection.EnlistTransaction(TransactionContainer.GetContainer(_name))
cmd.Connection = Connection
cmd.CommandText = sqlSelect
Dim reader As DbDataReader = cmd.ExecuteReader()
Dim table As New DataTable
table.Load(reader)
result.Tables.Add(table)
result.AcceptChanges()
Catch ex As Exception
Rollback()
Finally
Connection.Close()
cmd.Dispose()
End Try
pages. I am supposed to have the user complete the entire process
before any data is committed to the database. Does anyone have any
idea if this is possible? I am using CommittableTransaction in the
"GetContainer". It seems to me their should be a way to get a guid
from the Transaction and then use that guid on the next page to pick
the Transaction back up on the asynchronous postback.
I found pages like this http://msdn2.microsoft.com/en-us/library/system.transactions.enlistme...
it does not seem to cover this. Any help would be appreciated.
Dim factory As DbProviderFactory =
DbProviderFactories.GetFactory("Oracle.DataAccess.Client")
Dim Connection As DbConnection =
factory.CreateConnection()
Connection.ConnectionString = constr
Dim cmd As DbCommand = factory.CreateCommand()
Try
Connection.Open()
Connection.EnlistTransaction(TransactionContainer.GetContainer(_name))
cmd.Connection = Connection
cmd.CommandText = sqlSelect
Dim reader As DbDataReader = cmd.ExecuteReader()
Dim table As New DataTable
table.Load(reader)
result.Tables.Add(table)
result.AcceptChanges()
Catch ex As Exception
Rollback()
Finally
Connection.Close()
cmd.Dispose()
End Try