Savoir si l'objet connexion est toujours actif

ypothier Messages postés 80 Date d'inscription vendredi 4 janvier 2002 Statut Membre Dernière intervention 22 janvier 2007 - 30 août 2002 à 20:29
Paxcal Messages postés 42 Date d'inscription samedi 24 août 2002 Statut Membre Dernière intervention 3 octobre 2005 - 2 sept. 2002 à 20:20
Bonjour

Est-ce que quelqu'un sait comment faire pour savoir si l'objet connexion est toujours actif ??? Mais pas en utillisant l'objet TimeOut.

Merci
ypothier

2 réponses

shaiulud Messages postés 404 Date d'inscription mardi 18 décembre 2001 Statut Membre Dernière intervention 15 juillet 2014 22
2 sept. 2002 à 11:08
if IsObject(objConn) then

'OK
end if
0
Paxcal Messages postés 42 Date d'inscription samedi 24 août 2002 Statut Membre Dernière intervention 3 octobre 2005
2 sept. 2002 à 20:20
en utilisant la propriété state de l'object connection.

cn.state renvois une ou une combinaison des valeurs suivantes :

adStateClosed 0 Indicates that the object is closed.
adStateOpen 1 Indicates that the object is open.
adStateConnecting 2 Indicates that the object is connecting.
adStateExecuting 4 Indicates that the object is executing a command.
adStateFetching 8 Indicates that the rows of the object are being retrieved.

la propriétés s'applique à d'autres objets comme
Command, Connection, Record, Recordset, Stream

Pascal
0
Rejoignez-nous