Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC speed
Message
From
06/07/1998 16:46:41
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00114683
Message ID:
00114692
Views:
16
Hi Stephen

>I use the following code to connect to an Access 97 database
>(with an ODBC data source name of "HazMat"). The table "Carriers" happens to have only 5 rows and two columns in it but takes over 10 seconds to connect and read the first time. The larger the database the longer it takes. After the first read, however, a query is instantaneous. This is the first time I have tried to make an ODBC connection in Foxpro. Is there a way to speed up an ODBC connection, or is there a better way of making the connection? Any help would be appreciated!
>
>
> CLOSE DATABASES
> OPEN DATABASE ('d:\apss-win\240\usp')
> DELETE VIEW testodbc2
> messagebox ("Before connection")
> create sql view testodbc2 connection HazMat;
> as select id,carrier from carriers
> messagebox ("After connection")
> select * from testodbc2
>
>
>PS. I am running with a Pentium 166.

Are you deleting and recreating the view each time you run the application? Why not use a remote view in the database container that is not deleted and recreated each time? Also, buffer size in ODBC32 settings may affect speed as well as the PacketSize property of the connection (see DBSETPROP() command in VFP Help.)

HTH
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform