Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Managing connections
Message
De
31/10/2001 10:05:33
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
À
31/10/2001 09:49:25
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00575633
Message ID:
00575646
Vues:
22
This message has been marked as the solution to the initial question of the thread.
>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
Alexandre Palma
Senior Application Architect
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform