Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference between connection handle and string?
Message
From
19/03/2009 09:47:00
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01388455
Message ID:
01389487
Views:
54
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform