Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ConnString and Asynchronous behavior
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01386082
Message ID:
01386122
Vues:
71
>For about 6 months now, one specific form in an application loads very slowly in the development environment. Since it doesn't happen at the client site, I haven't bothered to look into it until today. The slowness was traced to the method that loads 12 remote views for SQL data. The USE command for each contains the ConnString clause and a string value. Most also contain the NODATA clause but 2 views load with data. The tables for these are typical lookup tables, each with 2 or 3 fields--one with 10 rows and the other with about 50. When using the string value for ConnString, the method took 13 seconds to execute! However, when the connection handle was substituted for the string, the views opened in less than 1 second--but there was a "connection busy" message when loading the second view containing data. It would appear that the connection behaved asynchronously even though it is defined with asynchronous = .f.

>Why is there such a big difference in performance between the connection string and the connection handle?

The former opens new connection for each view. It could be expensive depending on your environment/network.

>Why was there a connection busy message?

If you want to use a connection handle for more than one view, you have to create the connection as shared.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform