|
-
May 17th, 2000, 10:40 AM
#1
Thread Starter
New Member
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
-
May 17th, 2000, 02:58 PM
#2
Junior Member
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
-
May 17th, 2000, 05:07 PM
#3
Thread Starter
New Member
Thanx for the sugestion, but can u help in starting off with DAO?
Regards
BSTL
-
May 17th, 2000, 05:24 PM
#4
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|