Home » U++ Library support » U++ SQL » MSSQL binary data  
	
		
		
			| Re: MSSQL binary data [message #22837 is a reply to message #22812] | 
			Fri, 21 August 2009 14:18   | 
		 
		
			
				
				
				  | 
					
						  
						mirek
						 Messages: 14271 Registered: November 2005 
						
					 | 
					Ultimate Member  | 
					 | 
		 
		 
	 | 
 
	
		| tojocky wrote on Tue, 18 August 2009 10:18 |   Can anybody make a simple example how to insert and select binary data from table? 
I'm interesting in Oracle, Postgres and sqlite. 
  |  
  
 
Except for oracle, you just place SqlBinary into your insert 
 
SQL * Insert(IMAGE)(ID, id)(BODY, SqlBinary(data)); 
 
As for Oracle, this works too, but is hindered by oracle maximum statement length limit, which is ~32000 - means you can store only about 15KB. 
 
Another option is to use SqlRaw, but in that case you cannot use SqlExp: 
 
SQL.Execute("insert IMAGE(ID, BODY) values (?, ?)", id, SqlRaw(data)); 
 
This should work for all dbs... Usually, it is also more effective, but at the same time less convenient   
 
Mirek 
		
		
		[Updated on: Fri, 21 August 2009 14:20] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 01:06:10 CET 2025 
 Total time taken to generate the page: 0.04937 seconds 
 |