Hello,

LE BORGNE Hervé 214777 wrote:

> I am trying to get gata from a blob with postgresql through SOCI. It worked 
> perfectly with soci 2.2 but it returns 'Cannot convert data' with soci 3.0. 
> Note that I have the same error with the test programs included into SOCI. 
> Example of code is:
> 
> session sql ( soci::postgresql, "dbname=zzzzz user=yyyyy password=xxxxx" );
> sql <<"create table soci_test ( id integer, img oid)";
> sql << "insert into soci_test(id, img) values(7, lo_creat(-1))";
> sql.begin();
> {
>     blob b(sql);
>     sql << "select img from soci_test where id=7", into(b);
> }
> 
> This code works with soci 2.2 and not soci 3.0.

Interesting. As I see in comments to the test3() in PostgreSQL tests the 
BLOB operations have to be within a transaction block.
The file is src/backends/postgresql/test/test-postgresql.cpp.

I have just re-run all tests with PostgreSQL and they passed OK.

Regards,

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

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to