Results 1 to 6 of 6

Thread: Transactions for MSAccess with VB.NET

  1. #1

    Thread Starter
    Addicted Member parminder's Avatar
    Join Date
    Apr 2003
    Location
    India
    Posts
    168

    Transactions for MSAccess with VB.NET

    Hi all big players,

    Here is a problem I would like to ask:

    Can I use Transactions for MSAccess database in VB.NET

    Like DBEgine.BeginTrans, Rollbacks and DBEngine.CommitTrans in VB6 for MSAccess with DAO [not ADO]

    If not then how can we control Batch updations.

    Thanks

    Parminder

  2. #2
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Dublin (Ireland)
    Posts
    304
    not tried it but I would say a defintie yes, remember ADO.Net actually doesn't care which database you use. I do have one concern though, we used oledb in our application development, still linked to sql server (in our native application) but I've heard rumours that that support is being withdrawn, pisses me off because we could have gone for native sql and was only adopted oledb as a customer convenience if they already had a different type of database installed, e.g. FoxPro, Oracle, etc.

  3. #3

    Thread Starter
    Addicted Member parminder's Avatar
    Join Date
    Apr 2003
    Location
    India
    Posts
    168
    Thanks Richard

    Is you have code example ?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    No.

    Access does not support Transactions.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5
    Member
    Join Date
    May 2001
    Posts
    39

    What ?

    What do you mean ?

    - That an Access database does not support transactions (wrong) or that programming Access databases with ADO .Net is incompatible with transactions (wrong too), example:

    Dim CN as OledbConnection
    Dim Trans as OledbTransaction

    'Open your connection

    Trans = CN.BeginTrans

    Try
    'Code to update database

    Catch
    Trans.RollBack()
    'Close connection
    Throw
    End Try

    Trans.Commit()

    'Close connection

  6. #6

    Thread Starter
    Addicted Member parminder's Avatar
    Join Date
    Apr 2003
    Location
    India
    Posts
    168
    Thanks Desbaratizador


    I am using transactions in MS Access. Definately it is working fine.

    Thanks for your code and help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width