Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How long will a SQL connection last?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01102644
Message ID:
01102674
Vues:
14
>How long will a SQL Server connecttion stay active without refreshing? For example using the SQLCONNECT as follows: lnFileHandle = SQLCONNECT("ecpvgh")
>
>I have a report module that runs on our server, and it could be running for weeks or months without restarting it. Will the connection to SQL Server eventually time out if I don't use it for a while?

SQLCONNECT() is VFP function, right?
Here what VFP9 HELP said:

If your application doesn't take any action for a long time, you can reduce connection use by setting the IdleTimeout property on the connection. The IdleTimeout property controls the interval of time connections are allowed to idle before they're closed by Visual FoxPro. By default, connections wait indefinitely and are not deactivated until specifically closed by the user.

You set the idle time for a connection definition with the IdleTimeout property of the DBSETPROP( ) function; you can set the IdleTimeout property for an active connection with the SQLSETPROP( ) function.

Visual FoxPro closes connections even if Browse windows and forms displaying remote data are still open, and then automatically reconnects when the connection is needed again. However, Visual FoxPro cannot close a connection if:

Results of a query from the server are pending.

The connection is in manual transaction mode. You must commit or roll back the transaction and switch to automatic transaction mode before the connection can be closed.

You set the transaction mode for a connection definition with the Transactions property of the DBSETPROP( ) function; you can set the transaction mode for an active connection with the SQLSETPROP( ) function.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform