Thanks for the code, I'm checking this case. Looks like blob was not read correctly. Let you know as soon as I get new results.

 
Good luck,
Volodymyr!


On Saturday, February 1, 2014 3:44 PM, Volodymyr Tarasenko <tvntsr@yahoo.com> wrote:
Hi,

Mats, thanks for the code, I'm going to check it.

 
Good luck,
Volodymyr!


On Saturday, February 1, 2014 2:52 PM, Mats Christensen <matschristensen@gmail.com> wrote:
I missed the clob data on the earlier sql, this is correct.



On Sat, Feb 1, 2014 at 1:44 PM, Mats Christensen <matschristensen@gmail.com> wrote:
See the attachment select.c and clob_test.sql

Libzdb 3.0 and Oracle Instant Client 12.1
This setup returns the following for me:

mats@x220 ~/libzdb/libzdb-3.0/test $ ./select 
This is getString: 
this is a varchar        (null)
this is another var      (null)
This is getBlob: 
this is a varchar        this is a clob
this is another var      this is another clob


Can you see if it works for you? The problem might be my setup although I've tried two completely different linux setups.

Thanks!

Regards,
Mats Christensen



On Sat, Feb 1, 2014 at 1:12 AM, Jan-Henrik Haukeland <hauk@tildeslash.com> wrote:
ResultSet_getBlob or ResultSet_getString should be interchangeable on a blob or text column. Though of course, if the blob column contains binary data only ResultSet_getBlob should be used to get the correct value.

I should say that a problem with using ResultSet_getString on a blob column was just fixed in Oracle and confirmed fixed in version 3.0. So with one datapoint, the above seems to work. If you want us to investigate, we are also more inclined to do so if you can provide a small test program demonstrating the problem. Or argue in detail why the problem must be in libzdb.

Best regards
--
Jan-Henrik Haukeland

On 31 Jan 2014, at 13:36, Mats Christensen <matschristensen@gmail.com> wrote:

>
> I'm not very familiar with Oracle either but it seems like CLOB is for Oracle what TEXT is for Postgres and MySQL.
>
> There is a function in the dbmail-code called 'db_result_get_blob', it is used for several things,
> like '_fetch_headers'. HEADERVALUE is a CLOB.on Oracle and TEXT on Postgres.
>
> Perhaps this function should have been used on '_fetch_envelope' too?
>
> It will probably be easiest for me to just use getBlob instead, as for upstream, perhaps it's a good idea to use
> 'db_result_get_blob' for all TEXT/CLOB-fields if it works?
>
> Thank you very much for the help!
>
> Regards,
> Mats Christensen
>