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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.