Проблемы с выполнением хранимых процедур MSSQLServer
Релиб
Форумы       Участники    Календарь    Кто он-лайн?
Добро пожаловать, гость ( Вход | Регистрация )
        



Проблемы с выполнением хранимых процедур... Expand / Collapse
Автор
Сообщение
11.04.2006 21:46
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

участник
Last Login: 16.11.2006 17:16
Сообщ.: 68, Visits: 746
Из клиентского приложения a вызываю хранимую процедуру, но она не выполняется. Пробовал различные варианты параметров в приложении при вызове процедуры, но итог тот же.
Профайлером увидел, что происходит следующий вызов в трех разных случаях в зависимости от параметров на клиенте

declare @P1 int
set @P1=NULL
declare @P2 int
set @P2=0
declare @P3 int
set @P3=0
exec sp_cursorprepexec @P1 output, @P2 output, NULL, N'exec at_get_OKOPF 0', 8, 1, @P3 output
select @P1, @P2, @P3


declare @P1 int
set @P1=NULL
declare @P2 int
set @P2=0
declare @P3 int
set @P3=0
exec sp_cursorprepexec @P1 output, @P2 output, NULL, N'exec at_get_OKOPF 0', 16, 1, @P3 output
select @P1, @P2, @P3



declare @P1 int
set @P1=1
exec sp_prepexec @P1 output, NULL, N'exec at_get_OKOPF 0'
select @P1

В первых двух случаях получаю ошибку
Server: Msg 16937, Level 16, State 1, Procedure at_get_OKOPF, Line 1
A server cursor is not allowed on a remote stored procedure or stored procedure with more than one SELECT statement. Use a default result set or client cursor.
Server: Msg 8180, Level 16, State 1, Procedure sp_cursorprepexec, Line 7
Statement(s) could not be prepared.

В третьем случае
Server: Msg 8179, Level 16, State 2, Procedure sp_prepexec, Line 3
Could not find prepared statement with handle 1.

Помогите разобраться, плз.
Спасибо!
Сообщ. #895033
28.04.2006 11:24


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

модератор
Last Login: 29.10.2007 14:45
Сообщ.: 1 833, Visits: 16 863
Не уверен, что поможет, но в начале процедуры попробуй поставить SET NOCOUNT ON.
Сообщ. #896110
« пред. тема | след. тема »


Эту тему читают Expand / Collapse
Посетители: 0 (0 гостей, 0 участников, 0 скрыт.участников)
Сейчас нет участников, просматривающих тему.
Модераторы: Alexey, boombastik, bazile, pl, Alexey Spirin

Время GMT +3:00, Сейчас 9:16