Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
mirek is currently offline  mirek
Messages: 13976
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 Smile

Mirek

[Updated on: Fri, 21 August 2009 14:20]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: It is necessary BLOB field in MySQL
Next Topic: Possible SqlOption Problem [Solved]
Goto Forum:
  


Current Time: Fri May 10 20:22:16 CEST 2024

Total time taken to generate the page: 0.02863 seconds