|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PutDateTime throws Exception on Put |
« View previous topic :: View next topic » |
Author |
Message
|
Lord_Heken |
Posted: Wed Sep 05, 2012 11:47 am Post subject: PutDateTime throws Exception on Put |
|
|
Newbie
Joined: 04 Sep 2012 Posts: 5
|
Hi,
This is the situation, I'm using amqmdnet with the PV 6.0.2.0.
I'm triying to send the PutDateTime value to the queue, but I can't find the correct datetime format or something like that.
I tried several formats using this.
Code: |
CultureInfo ctrDate = new CultureInfo("en-US", false);
ctrDate.DateTimeFormat.ShortDatePattern = "yyyy/MM/dd";
ctrDate.DateTimeFormat.LongDatePattern = "yyyy/MM/dd";
ctrDate.DateTimeFormat.ShortTimePattern = "HH:mm:ss";
ctrDate.DateTimeFormat.TimeSeparator = ":";
ctrDate.DateTimeFormat.LongTimePattern = "HH:mm:ss";
ctrDate.DateTimeFormat.FullDateTimePattern = "yyyy/MM/dd HH:mm:ss";
System.Threading.Thread.CurrentThread.CurrentCulture = ctrDate;
|
OR
Code: |
CultureInfo ctrDate = new CultureInfo("en-US", false);
ctrDate.DateTimeFormat.ShortDatePattern = "yyyyMMdd";
ctrDate.DateTimeFormat.LongDatePattern = "yyyyMMdd";
ctrDate.DateTimeFormat.ShortTimePattern = "HHmmss";
ctrDate.DateTimeFormat.TimeSeparator = "";
ctrDate.DateTimeFormat.LongTimePattern = "HHmmss";
ctrDate.DateTimeFormat.FullDateTimePattern = "yyyyMMdd HHmmss";
System.Threading.Thread.CurrentThread.CurrentCulture = ctrDate;
|
And still the PutDateTime is travelink null to the queue.
This is the code.
Code: |
IBM.WMQ.MQMessage vloSentMsg = new IBM.WMQ.MQMessage();
IBM.WMQ.MQPutMessageOptions vloSentMsgOpt = new IBM.WMQ.MQPutMessageOptions();
vloSentMsg.PutDateTime = DateTime.Now;
typeOfRequierement = messageToSend.Substring(0, 3);
vloSentMsg.MessageType = 8;
vloSentMsg.PutApplicationType = 1;
vloSentMsg.Persistence = 1;
vloSentMsg.PutApplicationName = "Service";
QueueManagerName = QueueManager;
vcoControladorMQ = new IBM.WMQ.MQQueueManager(QueueManagerName);
vlnRequestOpenOptions = MQC.MQOO_SET_ALL_CONTEXT | MQC.MQOO_OUTPUT;
vloRequestQ = vcoControladorMQ.AccessQueue(RequestQueueName, vlnRequestOpenOptions);
vloSentMsg.Format = IBM.WMQ.MQC.MQFMT_STRING;
vloSentMsg.MessageType = IBM.WMQ.MQC.MQMT_REQUEST;
vloSentMsg.Expiry = Timeout;
vloSentMsg.CharacterSet = CharacterSet;
vloSentMsg.ReplyToQueueName = ReplyQueueName;
vloSentMsg.ReplyToQueueManagerName = vcoControladorMQ.Name;
vloRequestQ.Put(vloSentMsg, vloSentMsgOpt);
vloRequestQ.Close();
vcoControladorMQ.Disconnect();
|
------------------
Any Ideas?
Thanks!!! |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Sep 05, 2012 1:58 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Moved it to API support. Not sure exactly where it belongs... _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Sep 05, 2012 3:37 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you want to set yourself date and time and not let the qmgr do it, you need to use different pmo options.(set all?), and have the right authorizations for it!
If you think that the date on the message as stated by MQ is off, remember that the information on the message is in UTC time.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Sep 05, 2012 4:02 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I am also reluctant to understand
as anything other than "product version 6.0.2.0", and I find that a troubling version to be using, particularly with the .NET classes and XMS.
I'd encourage an investigation of the options to improve the product version to something fully and actually supported, like 7.5. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|