Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Very long time delay while accessing big tables with ADO
Message
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Very long time delay while accessing big tables with ADO
Miscellaneous
Thread ID:
00405817
Message ID:
00405817
Views:
65
I'm working on a Windows 2000 systems (2 550 MHz CPUs). I'm using ADO, OLE DB Provider and ODBC to connect to a FoxPro 6 database named MyDatabase. Here is the VB code of my connection. Of curse MyConnection is an ADODB.Connection object :

With MyConnection
.ConnectionString = _
"Provider=MSDASQL.1;" & _
"Persist Security Info=False;" & _
"Extended Properties=""" & _
"DSN=Visual FoxPro Tables;" & _
"UID=;" & _
"SourceDB=C:\MyDataBase.dbc;" & _
"SourceType=DBC;" & _
"Exclusive=No;" & _
"BackgroundFetch=Yes;" & _
"Collate=Machine;" & _
"Null=Yes;" & _
"Deleted=Yes;"""
.CursorLocation = adUseClient
.Open
End With

Then I'm creating a ADODB.RecordSet let say MyRecordSet to access the datas table in MyDataBase :

MyRecordSet.Open _
Source:="SELECT * FROM MyTable", _
ActiveConnection:=MyConnection, _
CursorType:=adOpenDynamic, _
LockType:=adLockOptimistic

My problem is if I'm modifying the content of a field in MyTable and using the method MyRecorSet.Update it take at least 20 seconds to make the update. It might not seem that much but considering that I have to make that operation 60 000 times it is unacceptably long.

The Table that my recordset is bound to have approximativly 300 000 lines for 232 Bytes per lines (50 fields). I admit that it is a big table but I was doing the same operations on the same table in Microsoft Access and it never took that mutch time (It use to take around 6-10 minutes for 60 000 updates) and I also done these operations on a smaller table and it was still very long. I cannot believe that FoxPro doesn't permit a fastest and more effective way for accessing and modifying datas.

I've tried to use to Server side for the client location property of the connection object instead of using the client side cursor but it didn't worked neither. I've also tried to make all my modifications to all the fields and then use the UpdateBatch method but each time my computer kind of freezed for an half hour and I had to kill the process of my application.

I would really need advises of someone who is used to acces big amount of datas in FoxPro databases with ADO.

Thank You for your help.
Next
Reply
Map
View

Click here to load this message in the networking platform