Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To make the COnnection persistent?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
How To make the COnnection persistent?
Divers
Thread ID:
00435483
Message ID:
00435483
Vues:
41
Hey all,

I am building an object to handle data access to the AS/400. I am using ODBC via SQL passthrough to execute commands on the AS/400, build aliases based on a specific file member, and then create remote views in a DBC that access those aliases.

Everything works great, except that for every operation, the connection appears to be dropped and re-initiated (I can tell because AS/400 Client Access causes a little icon to appear and disappear from the system tray). It doesn't ask for a username and password everytime (since that info is stored in the DBC Connection record), but it still slows things down.

I am using a Connection stored in the DBC, and there don't appear to be any settings that make sure the connection stays open and all views use it. The remote views have been created with the SHARE clause, which according to the help:

"If you include the SHARE clause, Microsoft Visual FoxPro will use a shared connection if one is available. If a shared connection isn't available, a unique connection is created when the view is opened and cannot be shared with other views."

How does one make a shared connection available? If I use SQLCONNECT() to open the named connection, when I try to use one of the remote views it drops the connection, reinitiates it, and gets the data. I just want the connection to stay open all the time. How do I force this?

Thanks in advance!

JoeK
sutekh@dwx.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform