Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21100

vb6 dao and begintrans & committrans

$
0
0
:mad:I have a old project with VB6 and DAO ( i have no time to modify this in ADO Jet:-(:sick:

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

Viewing all articles
Browse latest Browse all 21100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>