| Author | 
		  Message
		 | 
		
		  | mq_quest1 | 
		  
		    
			  
				 Posted: Wed May 23, 2007 12:38 am    Post subject: database error | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 11 May 2007 Posts: 15
  
  | 
		  
		    
			  
				Hi , 
 
 
I am doing a simple DB2 select function thru the broker. And I am getting the error 
 
---------------------------------------------------------------------- 
 
Text = [IBM][CLI Driver] CLI0124E Invalid argument value. SQLSTATE=HY009 
 
---------------------------------------------------------------------- 
 
 
I have created the System DSN and that connects succesfully and have configured the node also correctly.. 
 
 
My table structure is : 
 
 
ITEMNO : CHARACTER 
 
ITEMQTY : INTEGER 
 
 
and the esql i am using is : 
 
 
----------------------------------- 
 
 
DECLARE itemNo INTEGER; 
 
SET itemNo = InputRoot.XML.Customer.ApplicationData.CustomerID; 
 
 
DECLARE itemQtyAvailable INTEGER; 
 
 
-- Database lookup 
 
SET itemQtyAvailable = 
 
THE (SELECT ITEM T.ITEMQUANTITY FROM Database.SAMPLE.CUSTOMER AS T 
 
WHERE T.ITEMNO = InputRoot.XML.Customer.ApplicationData.CustomerID); 
 
 
-------------------------------------------------------- 
 
 
Any input is welcome.. 
 
 
and thanx in adavance... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed May 23, 2007 1:00 am    Post subject: Re: database error | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi mq_quest1,
 
 
   
	| mq_quest1 wrote: | 
   
  
	SET itemQtyAvailable = 
 
THE (SELECT ITEM T.ITEMQUANTITY FROM Database.SAMPLE.CUSTOMER AS T 
 
WHERE T.ITEMNO = InputRoot.XML.Customer.ApplicationData.CustomerID); | 
   
 
You said your table structure had 'ITEMQTY', but you are trying to get 'ITEMQUANTITY'.
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mq_quest1 | 
		  
		    
			  
				 Posted: Wed May 23, 2007 1:04 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 11 May 2007 Posts: 15
  
  | 
		  
		    
			  
				that is ITEMQUANTITY itself....   
 
didnt type fully there.. that s all.. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed May 23, 2007 1:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi mq_quest1,
 
 
This is what the Db2 infocenter says
   
	| Quote: | 
   
  
	CLI0124E Invalid argument value.  
 
 
Explanation: The value specified for an argument was invalid. Possible reasons may be a null pointer, invalid length, invalid option, etc. 
 
 
User Response: Re-examine the argument passed in to the function and determine which argument is invalid. 
 
 | 
   
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | edarasumanth | 
		  
		    
			  
				 Posted: Wed May 23, 2007 1:48 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 15 Jun 2006 Posts: 21
  
  | 
		  
		    
			  
				DECLARE itemNo INTEGER; 
 
SET itemNo = CAST(InputRoot.XML.Customer.ApplicationData.CustomerID); 
 
 
DECLARE itemQtyAvailable INTEGER; 
 
 
-- Database lookup 
 
SET OutputRoot.XML.Item.itemQtyAvailable = 
 
THE (SELECT  T.ITEMQTY FROM Database.SAMPLE.CUSTOMER AS T 
 
WHERE T.ITEMNO = itemNo); 
 
 
--
 
Could you please try in this manner | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mq_quest1 | 
		  
		    
			  
				 Posted: Wed May 23, 2007 1:59 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 11 May 2007 Posts: 15
  
  | 
		  
		    
			  
				thnx for the input to all...
  Last edited by mq_quest1 on Wed May 23, 2007 2:04 am; edited 1 time in total | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mq_quest1 | 
		  
		    
			  
				 Posted: Wed May 23, 2007 3:41 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 11 May 2007 Posts: 15
  
  | 
		  
		    
			  
				All,
 
 
The error was coz the connection was not being established properly.. "invalid argument" refers to the worng parameter in the conn string.. When specifyg the System DSN , the username and pwd shd be db2admin ( or wchever was specified durg installation) . Instead of this I was using the local userid and pwd which I use to connect to db..
 
 
thnx for all the feedback guys.. I appreciate it.... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |