|
-
Apr 12th, 2013, 05:39 AM
#1
Thread Starter
PowerPoster
vb6 dao and begintrans & committrans
I have a old project with VB6 and DAO ( i have no time to modify this in ADO Jet:-(
To speed up rs.addnew (during import a value from a text file, approx 224.000 lines) i need:
for x = o to number of mylinetext
ws.begintrans '(ws is set as workspace)
rs.addnew
rs(kkkk)=Mid(line......) ecc...
rs(bbbb)=Mid(line......) ecc...
'here i need rs.update (????)
next x
ws.committrans
in effect, after the last rs bbbbb, i need the command rs.update or begin and commit trans update in "one shot only" the entir data into the access table?
note:
my conn and my table opned:
Public Sub CHECK_CONNESSIONE()
If DB Is Nothing Then
DAO.DBEngine.SetOption dbMaxLocksPerFile, 1000000
Set WS = DBEngine(0)
Set DB = WS.OpenDatabase("C:\L\QUADRA.mdb")
Set RS = DB.OpenRecordset("L", dbOpenDynaset)
Set RS1 = DB.OpenRecordset("L2", dbOpenDynaset)
Else
DB.Close
Set DB = Nothing
End If
End Sub
Last edited by luca90; Apr 12th, 2013 at 05:46 AM.
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
|