Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection Handles
Message
 
 
À
09/09/1999 10:26:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00262866
Message ID:
00263046
Vues:
21
>I am accessing remote views via ODBC with a named connection in the VFP database. I thought I would get only one connection handle for the named connection, but it appears each time I open a remote view I get a new connection handle. I vaguely remember seeing something in the documentation about sharing connection handles.
>
>I would appreciate any information you could give me on how connection handles work. Would a shared connection handle greatly slow down data access? What is the most efficient way to open and close multiple data handles? What impact does the multiple connection handles have on the SQL Server database?
>
>
>Thank you,
>Garry

Several ways to get a shared connection for a view:

Under the VFP main menu, Tools, Options. In Remote Data tab, click the Share Connection box. Then click the Set As Default button.

When using the View Designer, you can click on Query on the menu. Click Advanced Options. Then you can Check or UnCheck the Share connection box depending on what you need for that view.

Programmatically:

Create SQL View MyRemoteView remote connection mycon share as select...

Once you open a shared connection view, you get get the connection handle using CursorGetProp. You can then use this handle for SQL pass-thru [SQLExec() function].

Primarily, I use shared, synchronous connection [to Oracle] because my retrievals are usually small and, therefore quite fast. Unshared connections are usually to things like an Access MDB or another VFP Database.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform