Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Managing connections
Message
From
31/10/2001 13:02:03
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, United States
 
 
To
31/10/2001 10:05:33
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00575633
Message ID:
00575750
Views:
18
Thanks Alexandre.

John

>>I am using both remote views and spt in my application. I have several questions about connections:
>>
>>1. If I have a form using remote views and they are all configured to share connections, is only one connection opened?
>
>Yes
>
>>
>>2. Are RV connections 'scoped' to a datasession i.e will they close when the datasession is closed? What about spt connections?
>
>No RV connections will be close when you close the last view that is using that connection.
>spt connections created by SQLCONNECT or SQLSTRINGCONNECT will be closed when you do SQLDISCONNECT(nhandle) OR SQLDISCONNECT(0)
>
>>
>>3. Is it more efficient to close a spt connection as soon as you are finished using it e.g. populate the rowsource of a combobox? If the rowsource needs to be requeried should you reopen a connection or keep it open until the form closes?
>
>That depends of you application design if you keep allways 1 connection open that will be always 1 connection activated to sqlserver if thwe licessing is number of concurrent connections then you have to make sure that you have has many connections has the number of clients using your application.
>>
>>4. How do you share spt connections (do you need to)?
>
>share with what?
>if you want to share a connection betwen RV and SPT then you need to do the following:
>first open the RV then do CURSORGETPROP('ConnectHandle', rvname) and then use that value to issue SQLEXEC(), with this senario you need to take in considuration that the connection can be busy e.g. if you use a view or requery that has fetch has needed the connection will be busy until the las block of data is fetched os you do a SQLCANCEL.
>>
>
>Hope that this will help you.
>>TIA
>>
>>John
Previous
Reply
Map
View

Click here to load this message in the networking platform