Transactions in an Ajax form

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top