Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO, vfpoledb and Large Foxpro Tables
Message
From
21/05/2002 16:24:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
ADO, vfpoledb and Large Foxpro Tables
Miscellaneous
Thread ID:
00659581
Message ID:
00659581
Views:
77
I am working with some large FoxPro Tables (Table 1 has 64K+ records and Table 2 has 350K+ records). It is taking an incredibly long time to just open up these tables in a recordset. After playing around, I noticed the quickest way to open these up was using the following commands:

rs1.Open "Table1", cnClient, adOpenKeyset, adLockReadOnly, 512
rs2.Open "Table2", cnServer, adOpenKeyset, adLockReadOnly, 512

However, I am getting the following error when executing the rs2.open command: Run-time error ‘-2147467259 (80004005)’: File is in use.

There are no files being used … Any help or suggestion on working with large tables would be greatly appreciated.

Below is the entire code:

Public cnServer As New ADODB.Connection
Public cnClient As New ADODB.Connection

Public Sub Main()

Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
Dim sConnect As String

sConnect = "Provider=VFPOLEDB.1;Data Source=m:\Data.dbc;"

With cnServer
.CursorLocation = adUseServer
.Mode = adModeRead
.ConnectionString = sConnect
.Open
End With

rs1.Open "Table1", cnClient, adOpenKeyset, adLockReadOnly, 512
rs2.Open "Table2", cnServer, adOpenKeyset, adLockReadOnly, 512

End Sub
Next
Reply
Map
View

Click here to load this message in the networking platform