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 » WebSphere Message Broker (ACE) Support » Error casting empty string as DATE in V6

Post new topic  Reply to topic
 Error casting empty string as DATE in V6 « View previous topic :: View next topic » 
Author Message
timjohnarm
PostPosted: Tue May 22, 2007 6:09 pm    Post subject: Error casting empty string as DATE in V6 Reply with quote

Apprentice

Joined: 28 Sep 2004
Posts: 40
Location: Melbourne Australia

In V5 if I cast an empty string as a DATE I get a value of 0002-12-31

In V6 I get a casting exception

What I'd actually like is to be able to get a value of 00000000 into an 8 byte CWF format field as a lot of my host apps other than by an MRM default like a NullLiteralFill
Back to top
View user's profile Send private message
timjohnarm
PostPosted: Tue May 22, 2007 6:11 pm    Post subject: Reply with quote

Apprentice

Joined: 28 Sep 2004
Posts: 40
Location: Melbourne Australia

"...as a lot of my host apps other..." Should read "... as a lot of my host apps require this behaviour, other"
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue May 22, 2007 11:08 pm    Post subject: Re: Error casting empty string as DATE in V6 Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi timjohnarm,
timjohnarm wrote:
In V5 if I cast an empty string as a DATE I get a value of 0002-12-31

In V6 I get a casting exception
Well if it's working in v5 and not v6, then you can always raise a PMR...

For the time being you could always use a IF to check for blank and replace with the '00000000'.

Regards.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed May 23, 2007 1:12 pm    Post subject: Re: Error casting empty string as DATE in V6 Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

timjohnarm wrote:
In V5 if I cast an empty string as a DATE I get a value of 0002-12-31

In V6 I get a casting exception

What I'd actually like is to be able to get a value of 00000000 into an 8 byte CWF format field as a lot of my host apps other than by an MRM default like a NullLiteralFill


The V6 behavior is the improved behavior. What you have is that you need to check your definition of the field in the message set. Make sure that a null value defaults to what you want (in this case '00000000').

As well make sure that the field is marked as nillable.

Then do something like
Code:
SET mydatefieldref VALUE = NULL;


Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error casting empty string as DATE in V6
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.