Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Difference between connection handle and string?
Message
De
19/03/2009 09:47:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01388455
Message ID:
01389487
Vues:
53
Hello,

when you use the connection string as a parameter a new connection is opened for each view, when using the statement handle only the connection behind this statement handle is used.

The "USE view" command is not always completly synchronous. If the view settings "FetchSize" or "MaxRecords" are not -1 FoxPro will fetch X records from the ODBC driver and then stop fetching on not closing the pending ODBC operation, this can lead to the "Connection is busy" error you receive.

Solution: configure all your view's to fetch the complete resultset at once, this code should do it ... (backup first!)
LOCAL lnCount, xj, laViews[1]
m.lnCount = ADBOBJECTS(m.laViews,"VIEW")
FOR m.xj = 1 TO m.lnCount
 DBSETPROP(m.laViews[m.xj], "VIEW", "FetchSize", -1)
 DBSETPROP(m.laViews[m.xj], "VIEW", "MaxRecords", -1)
ENDFOR
Regards
Christian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform