Brosske
Messages postés
98
Date d'inscription
jeudi 25 novembre 2004
Statut
Membre
Dernière intervention
12 août 2010
1
9 nov. 2007 à 11:55
Ben je ne pense pas que c'est çà.....
Voici le code qui s'exécute sur le client après avoir eu la commande de démarrage du serveur:
Dim Commando As String
Dim Pos As Integer
SendMessageToTaskManager "IMSDWRBSY"
MainWindow.Etat.Caption = "après sendBUSY"
DoEvents
Commando = MSGGetText(HwndTaskManagerDataWriterToDo)
SendMessageToTaskManager "IMSDWRBSY"
DoEvents
Pos = 1
MainWindow.TBox(0).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Commande
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(1).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Auteur
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(2).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Zone
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(3).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Atelier
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(4).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Produit
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(5).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Date
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(6).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Heure
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(7).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Anayse-ID
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(8).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Valeur
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(9).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'RangeResultat
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(10).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Extrapolation
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(11).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Couleur
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(12).Text = Mid(Commando, Pos, InStr(Pos, Commando, "@") - Pos) 'Exportée
Pos = InStr(Pos, Commando, "@") + 1
MainWindow.TBox(14).Text = Mid(Commando, Pos, 100) 'Historique
MainWindow.Etat.Caption = "Requete SQL"
'DoEvents
If IsNull(DBM) Then Set DBM = OpenDatabase(DBMainPath)
Set RSM = DBM.OpenRecordset("Select * From Mesures Where AnalyseID=" & Val(MainWindow.TBox(7).Text) & " And Date=#" & Format(MainWindow.TBox(5).Text, "mm/dd/yyyy") & "# And Heure=#" & Format(MainWindow.TBox(6).Text, "hh:mm:ss") & "#")
If RSM.RecordCount = 0 Then
'ErrorHandling "Record not found!"
Else
MainWindow.Etat.Caption = "Tentative .Edit"
On Error Resume Next
Err.Clear
RSM.Edit
If Err.Description <> "" Then
'ErrorHandling "Record Locked : " & Err.Description
Do
Wait (100)
Err.Clear
RSM.Edit
Loop While Err.Number <> 0 'wacht tot we kunnen editeren
'ErrorHandling "Record Released."
End If
On Error GoTo 0
If MainWindow.TBox(8).Text "" Then RSM!Valeur Null Else RSM!Valeur = MainWindow.TBox(8).Text
RSM!RangeResultat = MainWindow.TBox(9).Text
RSM!ExtrapolationID = MainWindow.TBox(10).Text
RSM!Couleur = Val(MainWindow.TBox(10).Text)
RSM!Exportée = MainWindow.TBox(11).Text
On Error Resume Next
Err.Clear
RSM.Update
If Err.Description <> "" Then
'ErrorHandling "Record Locked : " & Err.Description
Do
Wait (100)
Err.Clear
RSM.Update
Loop While Err.Number <> 0 'wacht tot we kunnen updaten
'ErrorHandling "Record Released."
End If
On Error GoTo 0
RSH.AddNew
RSH!Date = Format(Now, "dd/mm/yyyy")
RSH!Heure = Format(Now, "hh:mm:ss")
RSH!Login = MainWindow.TBox(1).Text
RSH!ADate = MainWindow.TBox(6).Text
RSH!AHeure = MainWindow.TBox(6).Text
RSH!AnalyseID = MainWindow.TBox(7).Text
RSH!Action = MainWindow.TBox(14).Text
RSH!Valeur = MainWindow.TBox(8).Text
RSH.Update
End If
RSM.Close
SendMessageToTaskManager "IMSDWRRDY"
DoEvents
Donc pas mal de doevents entre 2 non ?
F.M.