I cannot reproduce your issue. Please try to reproduce your issue in a new empty application. Create a new application, add a new button and add the following code on the button click event:
Code: Select all
var
i: integer;
MySession: TOraSession;
MyQuery: TOraQuery;
str: string;
begin
MySession := TOraSession.Create(self);
MySession.Server := 'ORA1110';
MySession.Password := 'tiger';
MySession.Username := 'scott';
try
MySession.ExecSQL('begin ' + #13 +
'DBMS_XDB.DeleteResource(''/public/test_README.txt''); ' + #13 +
'commit; ' + #13 +
'end;', []);
except
end;
MySession.ExecSQL('declare ' + #13 +
'res BOOLEAN; ' + #13 +
'begin ' + #13 +
'res := DBMS_XDB.createResource(''/public/test_README.txt'', ''This folder lists all of the US customer who are important to our business''); ' + #13 +
'commit; ' + #13 +
'end;', []);
MyQuery := TOraQuery.Create(self);
MyQuery.Session := MySession;
MyQuery.SQL.Text := 'select DBMS_XDB.GETCONTENTCLOB(''/public/test_README.txt'') RES FROM DUAL';
MyQuery.Open;
str := MyQuery.FieldByName('res').AsString;
ShowMessage(str + #13 + 'Length: ' + IntToStr(Length(str)));
end;
I got the result:
This folder lists all of the US customer who are important to our business
Length: 74
Please provide me the result of executing this code. If this code is working correctly then please modify this code to reproduce your issue.
Also please provide us the exact ODAC version that you are using (for example 6.90.0.59).