I need to write a text in MSMQ from Dynamics NAV.
Exactly same code with client 4.SP1 works, with client 5.00 doesn't work.
Or, better, the first time it works, the second time I get a write error while writing the text, and, after that, two times it works and the third time I get the write error.
Same code in client 4 works every time.
Can some one help me?
0
Comments
This will help to solve the issue.
Thank you,
KYDutchie
I tried this workaround and it works but it is very inefficient:
I create the MSMQ variables in NAV, I write the message, and I CLEAR them, so every time I need to write a message in the queue, I need to re-create the variables.
In version 4 SP1 I needed not to do such rreationa and clearing of the variables, on the contrary, I managed all these variables with a singleinstance codeunit, and I created the queue variables in codeunit 1 in "Loginstart" routine. After that I could write as many message as I wanted.
In version 5 I tried this same structure, and it doesn't work. I tried with a not singleinstance codeunit and it doesn't work. The only way is to CLEAR variables, in order to be in every case in the "first time" case.
But WHY ?