Connecting Tech Pros Worldwide Forums | Help | Site Map

Foxpro Query Locks Up

David Sorber via AccessMonster.com
Guest
 
Posts: n/a
#1: Nov 13 '05
Hello, I've got two questions. Im writing an Access 2000 database to
collect data from multiple Visual Foxpro Databases, total some figures,
save the data into a table for archiving purposes, and be able print out a
report. Im connecting to the Foxpro Databases using ODBC through VB version
6 and my Visual Foxpro Driver is dated at 12/7/1999 version 6.01.

1.When connecting to a particular Foxpro database my access program
completely locks up, I think mainly its because the Foxpro database may be
too large for it to handle. The code works fine on databases that are in a
1-200 MB range. However, the one that locks up is 310 MB. Any ideas on how
to run the ODBC driver without freezing up when querying a large Foxpro
database? Aside from changing the size of the database which isn?t an
option. One thing I was thinking of doing was updating my VFP Driver but I
know that could mess things up worse and not work at all then.

2. Also, when I query the foxpro database and it doesn?t lock up, the ODBC
driver takes awhile to search through each database and copy it to a temp
table for totaling purpose and other calculations. However, if I don?t
force the program to stop in between the connections to the foxpro
databases, the query does not completely finish and I get no data. At the
moment, I just use a MsgBox to stop the program and then wait 10 seconds
and then continue and it works fine, my question is would there be a way to
suspend the code from continuing without any kind of user interaction for
around 10-15 seconds so the query finishes and I can get complete data.
That way the user does not have to sit there clicking the MsgBox for each
database I connect to. For Example, in Java I know you can just use the
Function .wait(long in millliseconds) to wait for an amount of time. But I
need something like that in Visual Basic.

Thanks in advance

--
Message posted via http://www.accessmonster.com

David Sorber via AccessMonster.com
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Foxpro Query Locks Up


Nevermind I found out how to fix both. I needed a timer to stop the code
from running with a simple loop like this:

Dim x As Single
x = Timer
While Timer < x + 5
DoEvents
Wend

And that stops it for 5 seconds which is perfect. And the problem with
opening the large foxpro database if you wait til the last connection is
done with a timer in my instance it doesnt lock up anymore.

--
Message posted via http://www.accessmonster.com
Closed Thread