| Author | Message | 
		
		  | srinivasonmb | 
			  
				|  Posted: Mon Jul 15, 2013 11:09 pm    Post subject: How to add hexBinary value to Blob Object. |   |  | 
		
		  | Novice
 
 
 Joined: 04 Jul 2013Posts: 16
 
 
 | 
			  
				| i have converted charcter to blob object using CAST function. again i need to add hexaBinary value to my bolb object using xs:hexBinary(). but i am unable to add hexabinary value to blob object. 
 i have tried to convert blob object to xs:hexBinary value, but it could't work.
 
 please help me.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Mon Jul 15, 2013 11:15 pm    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| show your code. 
 show the errors.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | srinivasonmb | 
			  
				|  Posted: Tue Jul 16, 2013 10:56 am    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 04 Jul 2013Posts: 16
 
 
 | 
			  
				| please correct me if my code is wrong. 
 i have tried with below code.
 
 
 
   
	| Quote: |  
	| DECLARE xyz BLOB DECLARE abc CHAR
 
 SET xyz = CAST(abc AS BLOB);
 xs:hexBinary(xyz);
 |  
 but it showing an error as Syntax Error.
 
 I did not found any information to add a hexBinary value to BLOB object in forums and info center also.
 
 we have a suitable mapping node function xs:hexBinary().
 but how to use this function esql is a question.
 
 please suggest me.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Tue Jul 16, 2013 11:39 pm    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| xs:hexBinary is not an ESQL function. 
 That's why you get a syntax error, because it's not valid ESQL syntax.
 
 Are you using the XMLNSC parser?  Are you using a schema with that parser (a message definition)?  Does that schema specify that the field you are setting has a hexBinary representation?
 
 Then all you need to do is SET the field to the right data. The XMLNSC parser will perform the hexBinary conversion for you when it serializes the logical message tree.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Tibor | 
			  
				|  Posted: Wed Jul 17, 2013 12:42 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 20 May 2001Posts: 1033
 Location: Hungary
 
 | 
			  
				| xs:hexBinary(charValue) works as same as if you use ESQL function CAST(charValue AS BLOB). |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kimbert | 
			  
				|  Posted: Wed Jul 17, 2013 1:06 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| srinivasonmb: In addition to the advice given above, can I recommend that you install some of the samples and work through them. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | srinivasonmb | 
			  
				|  Posted: Wed Jul 17, 2013 8:10 am    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 04 Jul 2013Posts: 16
 
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |