On Sat, Feb 13, 2010 at 7:54 PM, Mariano Martinez Peck <
marianop...@gmail.com> wrote:

>
>
>> > 2) I need to know for all the backends, which ones use normal functions
>> and
>> > which ones the special functions
>>
>> Firebird provides odbx_lo_* capabilites and Oracle could but I didn't get
>> it
>> to work without segfault. All other backends use the regular functions to
>> manage large texts or blobs.
>>
>>
> So, with Oracle there is no way to use large objects through OpenDBX by the
> moment because the only way is using the special functions and you are
> having segmentation fault with them ?  Or I can also use normal functions
> for large objects in Oracle ?
>
>
Ok...more tests.

I could do this, using the NORMAL functions:

        CREATE TABLE test_large_columns (
            large_clob         CLOB,
            large_nclob       NCLOB,
           ).

INSERT INTO test_large_columns (large_clob, large_nclob)
        VALUES (''large_clob_data'' , ''large_nclob_data'' )

SELECT * FROM test_large_columns


That works without problems. My main problem is when the type is binary, for
example a BLOB. How can I insert a BLOB trough OpenDBX ? because OpenDBX
expects a char* as the query..... I see two solutions:

1) The database automatically converts the char or string into a BLOB ?  I
think MySQL do that.

2) Use database functions to convert a tring to a BLOB value.  I guess I
need to do something similar in Oracle, but I don't know how.

I have just tried this:

CREATE TABLE test_large_columns (
            large_clob         CLOB,
            large_nclob       NCLOB,
            large_blob        BLOB
           ).

INSERT INTO test_large_columns (large_clob, large_nclob,  large_blob)
        VALUES (''large_clob_data'' , ''large_nclob_data'' , EMPTY_BLOB())

SELECT * FROM test_large_columns


But when I am trying to fech the raw, using odbx_row_fetch  I get the
error:
 'ORA-00932: inconsistent datatypes: expected CHAR got BLOB'

I put EMPTY_BLOB()  because I don't know even how to put a CLOB :(

Ok....I am a bit lost  :(

Thanks

Mariano







> If there is no way, shouldn't we need to change this:
>
>
> http://www.linuxnetworks.de/doc/index.php/OpenDBX/DBMS_Datatypes#Large_object_types
>
> Thanks for the clarification.
>
> Mariano
>
>
>
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
libopendbx-devel mailing list
libopendbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX

Reply via email to