Results 1 to 4 of 4

Thread: Stupid but urgent!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4

    Unhappy

    Hi,

    A stupid beginner's question.

    A very small question- When we use the 'BeginTrans...CommitTrans' for database entry it does not always update the Access records. We are using the Jet Database Engine. There is no consistency in updating the records. It works when there is no 'BeginTrans...CommitTrans'.
    Please help...

    Thanx in advance

    Regards
    BSTL


  2. #2
    Junior Member
    Join Date
    Mar 2000
    Posts
    16

    Wink

    Like you i'm only a beginner but I have had more success with opening the table / dataset using DAO it's quick easy and doesn't take a lot of brain to suss (ideal for me)
    If you want a hand with DAO let me know

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4
    Thanx for the sugestion, but can u help in starting off with DAO?

    Regards
    BSTL

  4. #4
    Junior Member
    Join Date
    Mar 2000
    Posts
    16

    Talking

    Heres a bit of code i did earlier
    declarations:
    Dim dB As Database
    Dim qd As QueryDef
    Public LATESTBATCH As String

    'in module
    Function GetLatestBatch()

    Set dB = DBEngine.OpenDatabase("data.mdb")
    Set qd = dB.QueryDefs("latestbatchnumber")
    'connect dataset to data control
    Set frmMain.Data1.Recordset = qd.OpenRecordset()

    frmMain.Data1.Recordset.MoveFirst 'select first rec
    LATESTBATCH = frmMain.Data1.Recordset!Filename
    'frmMain.dtaLatestFile = LATESTBATCH
    End Function

    this opens the database and attaches the data to data1 datacontrol on the form 'main'
    I only retrieve the first record of one field called 'Filename' but you can use the same thing with multiple records and move through the dataset using .movenext and .moveprevious
    don't forget if you change any record value to use .update to commit the changes


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