OpenWriteQueue Error

doktor
Member Posts: 28
Hi,
I use MSMQ and I have following problem. When I open SQL database and run code, this error appears.
"The call to member OpenWriteQueue failed. MSMQQueueInfo returned the following message. The format name specified is invalid."
When I create backup and restore it as native database the code run successfull.
I run it on the same computer as Administrator. The computer is in the domain.MSMQ create Administrator and security for TEST MSMQ is allow for everyone.
Thanks for any response
the code :
MQBus.OpenWriteQueue('.\private$\test',0,0);
MQBus.SenderAuthenticationLevel:= 0;
MQBus.ReceiveTimeout := 2000;
I use MSMQ and I have following problem. When I open SQL database and run code, this error appears.
"The call to member OpenWriteQueue failed. MSMQQueueInfo returned the following message. The format name specified is invalid."
When I create backup and restore it as native database the code run successfull.
I run it on the same computer as Administrator. The computer is in the domain.MSMQ create Administrator and security for TEST MSMQ is allow for everyone.
Thanks for any response
the code :
MQBus.OpenWriteQueue('.\private$\test',0,0);
MQBus.SenderAuthenticationLevel:= 0;
MQBus.ReceiveTimeout := 2000;
0
Comments
-
Hello,
In my opinion, your problem is not because of sql db.
The code you mentioned should work in pair with opening the queue first, for listening, form a single instance codeunit, with something like this:MQBus.OpenReceiveQueue('.\private$\test',0,0);
On the other hand, the error sounds like the queue doesn't exist on the machine where you run the code, though you mentioned you run the code on the same machine... :-k
Try to create a new private queue with this code (create a new codeunit and run it):IF ISCLEAR (MQBus) THEN CREATE(MQBus); MQBus.CreateQueue('.\private$\TestQueue'); //MQBus.CreateQueue('MACHINENAME\private$\TestQueue'); //if the queue is about to be created on another machine on the network
This creates a private queue specially configured for Nav. Then try to run your code with this queue.
As far as I know, if you want to read/write from/to a queue that is on another machine, you can try:MQBus.OpenReceiveQueue('MACHINENAME\private$\test',1,0); //open queue for read MQBus.OpenWriteQueue('MACHINENAME\private$\test',1,0); //write to queue
I hope this helps.//Bogdan0 -
thanks it works0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions