I'm trying to use ODAC component with Delphi 10.3.
There is a problem in the transmission queue of an object of type "CLOB". It contains question marks(??????...) instead of all symbols.
Initial data:
I executed the script in PL/SQL Developer:
Code: Select all
-- create type:
create or replace type XX_QUEUE_TYPE is object
(
t_type int
,t_content varchar2(1000)
,t_clob clob
)
-- Create table
begin
dbms_aqadm.create_queue_table(
queue_table => 'XX_QUEUE_TBL',
queue_payload_type => 'XX_QUEUE_TYPE'
);
end;
-- Create Queue
begin
dbms_aqadm.create_queue(
queue_name => 'XX_QUEUE_Q',
queue_table => 'XX_QUEUE_TBL'
);
end;
-- Starting queue
begin
dbms_aqadm.start_queue(
queue_name => 'XX_QUEUE_Q'
);
end;
Next, I created a enqueue-button:
Code: Select all
procedure TForm1.btEnqueueClick(Sender: TObject);
var
MsgProp: TQueueMessageProperties;
Payload: TOraObject;
MsgId: String;
begin
MsgProp := TQueueMessageProperties.Create;
try
MsgProp.Priority := 1;
Payload := TOraObject.Create;
try
Form1.OraSession1.Connect;
Payload.AllocObject(OraSession1.OCISvcCtx, 'XX_QUEUE_TYPE');
Payload.AttrAsInteger['t_type'] := 333;
Payload.AttrAsString['t_content'] := Edit1.Text;
Payload.AttrAsLob['t_clob'].LoadFromFile('c:\temp\frez.log') ;
Payload.AttrIsNull['t_clob'] := false;
MsgId := OraQueue1.Enqueue(Payload, MsgProp);
meLog.Lines.Add('Inserting: MsgId: ' + MsgId +' - Message: ' + Edit1.Text );
finally
Payload.Free;
end;
finally
MsgProp.Free;
end;
OraTable1.Close;
OraTable1.Open;
end;
The test file consists of a single UTF 8 encoded phrase "Hello friends!!!"
Where is my mistake?