Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC speed
Message
De
06/07/1998 16:46:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00114683
Message ID:
00114692
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform