|   | 
	 
  
    | 
RSS Feed - WebSphere MQ Support
 | 
RSS Feed - Message Broker Support
 |   
 
  
	     | 
	 | 
   
 
  
	|  WMQI Casting to Data type of ROWID or equivalent | 
	« View previous topic :: View next topic »  | 
   
  
  	
	  
		
		
		  | Author | 
		  Message
		 |  
		
		  | megani | 
		  
		    
			  
				 Posted: Thu May 08, 2003 10:17 am    Post subject: WMQI Casting to Data type of ROWID or equivalent | 
				     | 
			   
			 
		   | 
		 
		
		   Apprentice
 
 Joined: 19 Dec 2001 Posts: 27
  
  | 
		  
		    
			  
				Hello, we're trying to delete a row from an external DB2 table via a       DeleteNode. We're trying to delete it based on a column call              OOS_ROWID. This column is of DB2 data type of rowid. We're getting
 
 the following message from the DeleteNode: " The following error
 
 occured during execution of SQL statement. [IBM][CLI Driver][DB2]
 
 SQL0301N The value of a host variable in the execute or open statement
 
 cannot be used because of its data type. SQLSTATE=42895. Within the
 
 DeleteNode on the bottom where you do the assigning, the Input Message ESQL is:Environment.Variables.WH.Results[1].OOS_ROWID the
 
Output Message ESQL (which is the database column) is OOS_ROWID.
 
The OOS_ROWID as I said is of type rowid. I'm not sure how to cast
 
Environment.Variables.WH.Results[1].OOS_ROWID to make it
 
compatible. Perhaps WMQI doesn't have support for this?? Thank you. | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | shalabh1976 | 
		  
		    
			  
				 Posted: Mon Jun 09, 2003 6:08 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		    Partisan
 
 Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India 
  | 
		  
		    
			  
				| So DB2 does have a ROWID data type. I thought that only Oracle had it. | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | kirani | 
		  
		    
			  
				 Posted: Thu Jun 12, 2003 5:26 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Jedi Knight
 
 Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA 
  | 
		  
		    
			  
				Have you tried using a PASSTHRU function within Database node to do this? _________________ 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 | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | Ian | 
		  
		    
			  
				 Posted: Fri Jun 13, 2003 4:56 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Disciple
 
 Joined: 22 Nov 2002 Posts: 152 Location: London, UK 
  | 
		  
		    
			  
				Hi,
 
 
   
	| Code: | 
   
  
	
 
DeleteNode: 
 
Input Message ESQL  : Environment.Variables.WH.Results[1].OOS_ROWID
 
Output Message ESQL : OOS_ROWID (defined as DB2 ROWID)
 
 | 
   
 
 
 
The current mapping that you have will result in a CHARACTER (the default) datatype on the Input.
 
 
ROWID would appear to be a valid DB2 column type. However, I didn't find any information for the ROWID under the DB2 built in datatypes documentation nor the supported conversion table between datatypes.
 
 
The WMQIv2.1 ESQL reference manual includes a section on implicit casts between database and WMQI datatypes.
 
 
Without having tried this I would suspect the fault could lie within one of two areas :
 
 
1. You can't use ROWID as part of a where condition
 
 
Try executing the SQL DELETE ... WHERE ROWID = ... statement from DB2 command line 
 
 
2. You need to cast the Input value to a numeric (INTEGER, FLOAT or DECIMAL) datatype 
 
 
CAST(Environment.Variables.WH.Results[1].OOS_ROWID AS ...) _________________ Regards, Ian | 
			   
			 
		   | 
		 
		
		  | 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
  | 
  		 
	   
	 | 
   
 
  	 | 
	  |