Page 1 of 1

severe bug inserting clob

Posted: Wed 26 Oct 2016 08:27
by albourgz
Using Unidac 6.4.14, c++ builder XE10.
Connected in direct mode to oracle 12.1.

Code: Select all

Name     Null     Type         
-------- -------- ------------ 
DTMESS   NOT NULL TIMESTAMP(6) 
PRIORITY NOT NULL NUMBER(1)    
MESSAGE  NOT NULL CLOB         
ID       NOT NULL NUMBER(20)   
STATUS            VARCHAR2(20) 
DTMess and ID have default values.
I have query QInsClob:

Code: Select all

INSERT INTO cec.MessagesService(priority, message) VALUES (:1,:2)
linked to connection UniConnection1.

I have a button:

Code: Select all

    UniConnection1->StartTransaction();
    QInsLob->Prepare();
    QInsLob->Params->Items[0]->AsInteger=1;
    QInsLob->Params->Items[1]->AsMemo=L"aaa";
    QInsLob->ExecSQL();
    UniConnection1->Commit();
This works.
If instead of

Code: Select all

    QInsLob->Params->Items[1]->AsMemo=L"aaa";
I have

Code: Select all

QInsLob->Params->Items[1]->AsMemo=L"<sendEmail><subject>Demande d'autorisation de commande</subject><body>From : ABO\r\n"
    L"ABO(Alain Bourgeois) vous demande d'autoriser la commande n° 2078\r\n"
    L"Commentaire: test</body><to><trig>XDL</trig></to>   <reply>[email protected]</reply><blog><table>provorder</table><ID>2078</ID></blog></sendEmail>";
I get an error ORA-01461: can bind a LONG value only for insert into a LONG column.

So direct mode doesn't accept insert of string >256 bytes with AsMemo.
Question: How can I change the code so that it works (in oracle AND in postgres)?

Regards.

Re: severe bug inserting clob

Posted: Fri 28 Oct 2016 13:03
by MaximG
We have checked ODAC functionality when using CLOB fields in the Direct Mode. Unfortunately, we couldn't reproduce the issue. Please compose a complete demo sample reproducing the issue, and send it to us for further investigation.