Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Visual Basic [игнор отключен] [закрыт для гостей] / Ошибка - Время ожмдания истекло / 4 сообщений из 4, страница 1 из 1
22.02.2007, 06:50
    #34348805
Azeke
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Ошибка - Время ожмдания истекло
Привет.

У меня программа вызывает хранимую процедуру в MSSQLServer2000.

авторPrivate Sub Start_Stored_Proc(cn As ADODB.Connection, dd$, mm$, yy$)
Dim cm As ADODB.Command
Dim p As ADODB.Parameter, p1 As ADODB.Parameter
Set cm = New ADODB.Command
Set cm.ActiveConnection = cn
cm.CommandType = adCmdStoredProc
cm.CommandText = "PerevodM70"
Set p = cm.CreateParameter("SelectDate", adVarChar, adParamInput, 4, mm$ & yy$)
Set p1 = cm.CreateParameter("UseDay", adVarChar, adParamInput, 2, dd$)
cm.Parameters.Append p
cm.Parameters.Append p1
cm.Execute
For i% = 1 To 8
k$ = Choose(i%, "m03u", "m30", "arenda", "vmd_sut", "m70", "ar_p", "ar_v", "upv")
SetINI App.path & "\Set.ini", "Kontrol_files", k$, "0"
Next i%
End Sub


Время от времени (в последне время почти всегда) возникает ошибка:

авторRun-time error '-2147217871 (80040e31)':
Время ожидания истекло
...
Рейтинг: 0 / 0
22.02.2007, 07:08
    #34348822
orunbek
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Ошибка - Время ожмдания истекло
cm.TimeOut=...
...
Рейтинг: 0 / 0
22.02.2007, 08:01
    #34348855
Azeke
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Ошибка - Время ожмдания истекло
cm.TimeOut=...
а по подробнее можно. Какие параметры и в чем в секундах или милесекундах.
...
Рейтинг: 0 / 0
22.02.2007, 08:39
    #34348901
orunbek
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Ошибка - Время ожмдания истекло
Типичный поиск в Google
ADO Command Timeout

Нашел следующее:
wwwCommandTimeout Property

Indicates how long to wait while executing a command before terminating the attempt and generating an error.
Settings and Return Values

Sets or returns a Long value that indicates, in seconds, how long to wait for a command to execute. Default is 30.
Remarks

Use the CommandTimeout property on a Connection object or Command object to allow the cancellation of a command due to delays from network traffic or heavy server use. If the time from the CommandTimeout property setting elapses prior to execution of the command, an error occurs and ADO cancels the command. If you set the property to zero, ADO will wait indefinitely until the execution is complete. Make sure the provider and data source to which you are writing code supports the CommandTimeout functionality.

For Connection objects, the CommandTimeout property is read/write.

When you use CommandTimeout on a Connection object, you set a global value for all commands executed and all recordsets opened on that connection. You can override this value for a specific command by setting the CommandTimeout property of the appropriate Command object.

http://%5D%5B/url]http://]
...
Рейтинг: 0 / 0
Форумы / Visual Basic [игнор отключен] [закрыт для гостей] / Ошибка - Время ожмдания истекло / 4 сообщений из 4, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]