Hello,

Shridhar Daithankar wrote:

> For using blob, I can do this
> 
> -----------
> sql << "insert into blobtest(id, img) values(7,lo_creat(-1) )";
> sql << "select img from blobtest where id=7",into(b);
> 
> b.write(0,(char *)ptr,stbuf.st_size);
> -----------
> 
> but not this
> -----------
> sql << "select lo_creat(-1)",into(b);
> b.write(0,(char *)ptr,stbuf.st_size);
> 
> sql << "insert into blobtest(id, img) values(7,:b)",use(b);
> -----------

That's right. The assumption is that BLOBs are already placed somewhere 
and are only accessed by the client.

> Is it possible to 
> support second form? 

I'm not sure if it would be possible with the other backends (in 
particular with Oracle), but at least with PostgreSQL the idea seems to 
be reasonable, as insertion would simply work on the oid value.

Regards,

-- 
Maciej Sobczak * www.msobczak.com * www.inspirel.com

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to