New topic: 

Storing pictures as binary data in PostgreSQL

<http://forums.realsoftware.com/viewtopic.php?t=44801>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        plim          Post subject: Storing pictures as binary data in 
PostgreSQLPosted: Sun Jul 22, 2012 1:11 am                         
Joined: Tue Jan 24, 2006 11:04 am
Posts: 100
Location: Singapore                Using the RB Database, you can store and 
retrieve a picture as follows (fragments of code):

dr.PictureColumn("PicBlob") = pic
pic = rs.Field("PicBlob").PictureValue


Does anyone have any working code for PostgreSQL, if possible using prepared 
statements? I am looking for a more efficient way than storing as EncodeBase64 
string data.

I assume that the pg database field has to be BYTEA. I have tried various 
combinations of code with no success. I'm not even sure if binding works, as 
PostgresqlPreparedStatement has a bug where numeric data have to be cast as 
strings; what happens with binary data?      
_________________
RealStudio Enterprise 2011r4.3 Windows 7 64bit sp1
http://www.sorted.com.sg  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to