severe bug inserting clob
Posted: Wed 26 Oct 2016 08:27
Using Unidac 6.4.14, c++ builder XE10.
Connected in direct mode to oracle 12.1.
DTMess and ID have default values.
I have query QInsClob:
linked to connection UniConnection1.
I have a button:
This works.
If instead of
I have
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.
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)
I have query QInsClob:
Code: Select all
INSERT INTO cec.MessagesService(priority, message) VALUES (:1,:2)
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();
If instead of
Code: Select all
QInsLob->Params->Items[1]->AsMemo=L"aaa";
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>";
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.