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 » Database SELECT does not retrieve NULL fields.

Post new topic  Reply to topic
 Database SELECT does not retrieve NULL fields. « View previous topic :: View next topic » 
Author Message
audessie
PostPosted: Mon Dec 13, 2004 8:14 pm    Post subject: Database SELECT does not retrieve NULL fields. Reply with quote

Newbie

Joined: 13 Dec 2004
Posts: 1

I am having a problem with WBIMB V5. I am trying to migrate a flow from Version 2.1 to Version 5.
I have a DATABASE SELECT with a THE. But it does not retrieve the fields that have a NULL value in the database. Is this something new in V5,because in V2.1 even if the fields were NULL in the database, they were being retrieved into the environment tree.
Heres the log from V5 and V2.1

Version 5.0 log
--------------------------
(0x03000000):store_add1 = 'Target Centre'
(0x03000000):store_city = 'Melb'


Version 2.1 log
-------------------------
(0x3000000)store_add1 = 'Target Centre'
(0x3000000)store_add2 = NULL
(0x3000000)store_city = 'Melb'

I am trying to assign a value to store_add2 further in the code, but it does not work since store_add2 does not exist in the Environment tree.

Please help.
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Dec 13, 2004 11:36 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

It could be that its not displayed in the trace node. But you can assign a new value to the element that does not exist in Environment tree.
Also, to check whether the value is retrieved from db or not, you can use code like this,
if ( Environment.Variables.store_add2 is null) then
-- your field is retrieved from db
end if;
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Tue Dec 14, 2004 10:53 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Just spotted this in a debug trace, following a SELECT from a DB:
Quote:
Assigning NULL to 'Environment.Variables.SETTINGS', thus deleting it.

Which was actually one of the Children of Environment.Variables.SETTINGS. So, when retrieving a null field from a DB into the Environment tree, the tags that would contain the null values are in fact deleted.

You could also try reading the result in the the OutputRoot.XML tree, because I know, for 2.1 (haven't tested for 5), reading null fields produced different results because of the different way the 2 trees (Environment and Root) were handled.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » WebSphere Message Broker (ACE) Support » Database SELECT does not retrieve NULL fields.
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.