0

I have created this trigger to insert new row into table @AL_ORDR_TRACKER after new row is inserted in table ORDR.

CREATE TRIGGER dbo.trgAfterInsertORDR ON dbo.ORDR
AFTER INSERT
AS
BEGIN
INSERT INTO dbo."@AL_ORDR_TRACKER"
        (U_DocEntry, U_Updated)
    SELECT
        DocEntry as U_DocEntry, GETDATE() U_Updated
        FROM inserted
END

The trigger gets registered but when inserting new rows into ORDR I get the error message:

Connection is busy with results fro another commands

What might be going wrong here?

  • 1
    Is @AL_ORDR_TRACKER a table? Why are you double quoting it? – McNets Aug 29 at 19:14
  • @McNets, yes it is. – W.M. Aug 29 at 19:27
  • What client driver and programming environment? It appears that the client connection is not busy with results from another command, which suggests you're reusing a single client connection object for multiple concurrent operations. – David Browne - Microsoft Aug 29 at 20:17
  • Is there any other trigger involved? – McNets Aug 29 at 20:48
  • It looks like you have MARS enabled and there is a result set active from another command. Can you post the connection string so we can check? – kirchner Aug 30 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.