Bonjour

En vb6, j'ai ce code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Set cn = New ADODB.Connection
    cn.CursorLocation = adUseClient
    cn.Open glConnectionString
 
'    'Retrieve copies to print
    Set cmd = New ADODB.Command
    With cmd
        .ActiveConnection = cn
        .CommandType = adCmdStoredProc
        .CommandText = "PUMPRMEVENTGROUP"
        .NamedParameters = True
        .Parameters.Append .CreateParameter("@cAction", adChar, adParamInput, 1, "S")
        .Parameters.Append .CreateParameter("@cSubAction", adVarChar, adParamInput, 25, "EVENTGROUPID")
        .Parameters.Append .CreateParameter("@TIEVENTGROUPID", adInteger, adParamInput, , EventGroupId)
    End With
Si je veux mettre un timeout sur la requête = à 300, à votre avis je dois la mettre suivant :
cn.CommandTimeout = glSQLRequestTimeout

ou bien

cmd.CommandTimeout = 300

?
Dois-je la mettre sur la connection, la commande ou les deux ?

Je vous remercie d'avance de vos réponses