astraeuz
10-23-2004, 03:38 AM
I'm working with an application which does a massive amount of operations on my database. In the beginning, database size is atmost 1.3 MB but, it becomes more that 100 MB and some times ~500MB :-\
The application simply reads data, do some calculations and stores the updated data back to the DB.
I'm using following connection string to open the db connection
Set oCon = New ADODB.Connection
oCon.CursorLocation = adUseClient
oCon.Mode = adModeShareDenyNone
oCon.IsolationLevel = adXactBrowse
oCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db.mdb;Jet OLEDB:Database Password=pm$wd;"
oRs.Open "select * from table where bActive = true order by ID, UserID Desc", oCon, adOpenDynamic, adLockBatchOptimistic
While NOT oRS.EOF
......
......
oRS.Update
.......
.........
oRS.Update
........
.......
........
oRS.UpdateBatch
oRS.MoveNext
oRS.Close
Am I doing something wrong with Locks or the Connection Mode?
The application simply reads data, do some calculations and stores the updated data back to the DB.
I'm using following connection string to open the db connection
Set oCon = New ADODB.Connection
oCon.CursorLocation = adUseClient
oCon.Mode = adModeShareDenyNone
oCon.IsolationLevel = adXactBrowse
oCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db.mdb;Jet OLEDB:Database Password=pm$wd;"
oRs.Open "select * from table where bActive = true order by ID, UserID Desc", oCon, adOpenDynamic, adLockBatchOptimistic
While NOT oRS.EOF
......
......
oRS.Update
.......
.........
oRS.Update
........
.......
........
oRS.UpdateBatch
oRS.MoveNext
oRS.Close
Am I doing something wrong with Locks or the Connection Mode?