Ответить на сообщение
Вернуться к теме
Вы отвечаете на сообщение:
ник: Силblч
cmd.ActiveConnection = conn cmd.CommandType = adCmdStoredProc cmd.CommandText = oexec cmd.Execute , , adAsyncExecute '----------- ret = adoTrayRS(cmd, "Процедура") If ret.State = 0 Then If Len(ret.msg) > 0 Then '-- узнать причину MsgBoxC ret.msg, , "ExecFinRep::adoTrayRS" End If cmd.Cancel GoTo err123 End If
Public Sub Timer() On Error Resume Next Dim TT Static i& TT = Format(Abs(Time() - StartTime), "Long Time") Me.txtTimeOf = TT i = i + 1: updateBar i If i > 20 Then clearBar phWnd: phWnd = initBar(20): i = 1 If conn.State = 0 Then frmState.msg = "Сервер прервал сессию" Call btnCancel_Click Exit Sub End If Select Case tRS.State Case adStateClosed '0 Indicates that the object is closed. Me.capInfo.caption = "Закрыт:" Me.capInfo.ForeColor = RGB(255, 0, 0) frmState.msg = "Запрос закрыт со стороны сервера " & iDevelop frmState.State = 0 Call timer_Stop: isCancel = 0: Me.Hide Exit Sub Case adStateOpen '1 Indicates that the object is open. Me.capInfo.caption = "Выполнен:" frmState.State = 0 Call timer_Stop: isCancel = 0: Me.Hide Exit Sub Case adStateConnecting '2 Indicates that the object is connecting. Me.capInfo.caption = "Подключен:" Case adStateExecuting '4 Indicates that the object is executing a command. Me.capInfo.caption = "Выполняется:" Case adStateFetching '8 Indicates that the rows of the object are being retrieved. Me.capInfo.caption = "Выгружается:" End Select If Err = 0 Then Exit Sub err123: frmState.msg = Error & vbCrLf & iDevelop Call btnCancel_Click Exit Sub End Sub
Set zs = CreateObject("ADODB.Recordset") zs.CursorLocation = adUseClient zs.Open fsql, conn, adOpenStatic, , adAsyncExecute Or adAsyncFetch ret = adoTrayRS(zs) If ret.State = 0 Then If Len(ret.msg) > 0 Then '-- узнать причину MsgBoxC ret.msg, , "ExecFinRep::adoTrayRS" End If zs.Cancel Else ttime = Time() - ttime Call set_oqstat((repid), (ttime), zs) End If
Ваше имя:
Пароль:
Сообщение:
Прикрепить:
Для вставки смайлов в текст щелкните по значку.