Transactions in an Ajax form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mechanic

    Transactions in an Ajax form

    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 CommittableTran saction in the
    "GetContain er". 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/lib...tions.enlistme...
    it does not seem to cover this. Any help would be appreciated.

    Dim factory As DbProviderFacto ry =
    DbProviderFacto ries.GetFactory ("Oracle.DataAc cess.Client")
    Dim Connection As DbConnection =
    factory.CreateC onnection()
    Connection.Conn ectionString = constr
    Dim cmd As DbCommand = factory.CreateC ommand()
    Try
    Connection.Open ()

    Connection.Enli stTransaction(T ransactionConta iner.GetContain er(_name))
    cmd.Connection = Connection
    cmd.CommandText = sqlSelect
    Dim reader As DbDataReader = cmd.ExecuteRead er()
    Dim table As New DataTable
    table.Load(read er)
    result.Tables.A dd(table)
    result.AcceptCh anges()
    Catch ex As Exception
    Rollback()
    Finally
    Connection.Clos e()
    cmd.Dispose()
    End Try
Working...