Any SQL statements throw exception "General error: 20019 Attempt to initiate a new Adaptive Server operation with results pending [20019] (severity 7)"
Михаил Гаврилов <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Any SQL statements throw exception "General error: 20019 Attempt to
initiate a new Adaptive Server operation with results pending [20019]
(severity 7)" after execution procedure dbo.test2
CREATE TABLE dbo.test01 (
ttt int NOT NULL
)
GO
CREATE PROCEDURE dbo.test2
AS
set xact_abort on
BEGIN TRY
begin tran
insert into test01 (ttt) values (NULL) /* Here we make SQL error */
commit
END TRY
BEGIN CATCH
-- rollback
return -1 /* Here may be raiserror */
END CATCH
GO
Why?
--
Best Regards,
Mike Gavrilov.