ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Websphere MQ and VB.Net (or any .Net language)

Post new topic  Reply to topic
 Websphere MQ and VB.Net (or any .Net language) « View previous topic :: View next topic » 
Author Message
Tergo
PostPosted: Wed Feb 11, 2004 11:42 am    Post subject: Websphere MQ and VB.Net (or any .Net language) Reply with quote

Guest




Help! In VB.Net, the System.String datatype is inherently Unicode, whereas in VB6 it was inherently ASCII. Here is the problem:

If you take the following 3 characters and write it to a queue without .Net, if you examine the message in hexadecimal you will see:

The string we are writing in: XHO
The hexadecimal representation: 58 48 4F
Data length: 3

However, if you take the same 'XHO' string, but this time from VB.Net, and write it to a queue you get:

The string we are writing in: XHO
The hexadecimal representation: 58 00 48 00 4F 00
Data length: 6

When Websphere sees the Unicode, he pads each character with an extra empty byte. Does anyone know of a way to prevent this from occurring? Or alternatively, does anyone know how to write the message into the queue byte for byte instead of using a string?
Back to top
RogerLacroix
PostPosted: Wed Feb 11, 2004 12:52 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

Hi,

I have moved your post from the Capitalware forum to the MQSeries API Support forum because it really has nothing to do with Capitalware's products. Plus I know very little about VB or VB.NET (I'm a Java guy ).

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
JasonE
PostPosted: Wed Feb 11, 2004 2:03 pm    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Please dont cross post. I've answered this in your general discussion forum append
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Websphere MQ and VB.Net (or any .Net language)
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.