General information
Title:
ADO, vfpoledb and Large Foxpro Tables
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only