 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
The addon is using a completely different interface to execute the code using connection owned by SSMS. It kind of subscribes to messages using callback mechanism available in SQLClient. And it seems to receive multiples of them. When the same is executed in SASE it receives all messages directly without callbacks.
|
|
Wed Jul 24, 2024 1:27 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Here is a better explanation.
The addon subscribes to the messages returned by the shared SQL connection. That's different from SSMS which owns the connection and receives all messages directly from the code execution. If you execute SELECT 1/0 five times in SSMS using F5, there are going to be five "Divide by zero error encountered...." messages pumped to the message subscriber event queue. If after F5 you activate SQL Assistant and execute the same code using Ctrl+Shift+F9, it will print all messages, five message that SQL Server pumped before, and an additional message from the latest code execution. So you will see six of them. With that flexible mechanism the subscriber doesn't know exactly where messages originated and cannot just ignore them silently. Yet that mechanism enables the addon to receive messages from the connection without taking over it and denying it to SSMS.
With that in mind, if you execute your code using F5 only or Ctrl+Shift+F9 only, you won't see that issue. If you use both hotkeys, then some messages are going to be repeated.
|
|
Sat Jul 27, 2024 11:25 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|