Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Share connection
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00103577
Message ID:
00103783
Views:
12
Having any value for the number of records to fetch at a time other than -1 (fetch all at once) can cause VFP to use the connection ansychronously. If none of the views return more than 100 records you'll never have a problem. However, when one does return more than 100 records execution will continue and VFP may try to open another view before the first one is finished. SQLCANCEL seems like a bad idea unless you actually want to cancel a query. I would set fetch at a time to -1 for every view unless you really need asynchronous execution. If you do need asynch. execution, use multiple connections.

>I am using a Synchronous connection for all the views.
>Records to be fetch at a time is default to 100
>Maximum records to fetch is -1
>What I am worry about is that the original programmer uses SQLCANCEL
>at lot even though we never use Asynchronous connection.
>Do you think this is the cause?
>Thanks for the advice.
>Kevin.
>
>>Kevin,
>>
>>Only one query can execute over a single connection at once. Chances are, when you open your views, one is still opening when you try to open the next one. This can happen if your connection is set for asynchronous execution or (more likely) if your views have a fetch size that is causing fewer than the total number of records to be fetched at once. If you set the FetchSize of all your views to -1 (fetch all records at once) you should be OK.
>>
>>>I am getting a strange error message from VFP 5.0a
>>>stating that the DSN is busy. I use a shared connection
>>>with ~30 remote views to a MS SQL Server 6.5 database.
>>>What did I do wrong? Does anyone know of a remedy?
>>>Thank you in advance.
>>>
>>>Kevin Yang
>>>Vartec Telecom, Inc.
>>>kyang@vartec.net.
Previous
Reply
Map
View

Click here to load this message in the networking platform