I've a realized a problem with DBMS_OUTPUT.GET_LINES.
I'm using the following code get the results from DBMS_OUTPUT:
Code: Select all
procedure TDBMS_Output.Get_Lines(out Lines: string; var NumLines: Integer);
var i: Integer;
StoredProc : TOraStoredProc;
begin
lines := '';
StoredProc := TOraStoredProc.Create(nil);
try
StoredProc.Session := Session;
StoredProc.StoredProcName := 'sys.dbms_output.get_lines';
StoredProc.PrepareSQL;
StoredProc.ParamByName('numlines').AsInteger := NumLines;
StoredProc.ParamByName('lines').Length := NumLines;
StoredProc.Execute;
NumLines:= StoredProc.ParamByName('numlines').AsInteger;
for i := 1 to NumLines do
if i <= 1 then
Lines := StoredProc.ParamByName('lines').ItemAsString[i]
else
Lines := Lines + #13#10 + StoredProc.ParamByName('lines').ItemAsString[i];
finally
FreeAndNil(StoredProc);
end;
end;
Code: Select all
begin
dbms_output.put_line('-A
-B');
END ;
Using:-A
-
Code: Select all
begin
dbms_output.put_line('-A
-B
-C
-D
-E
-F');
END ;
Each CRLF in the original line leads to one missing character at the end of the result.-A
-B
-C
-D
-
The environment and session settings looks like:
The same in SQL*Plus seams to work fine.Odac-Version 9.5.15
.
OCI-Lite False
OCI-Events True
OCI-Threaded True
OCI-Mutexed True
OCI-Shared False
OCI-Unicode True
.
.
Default Oracle Home InstantClient1
.
Oracle Home Count 2
Oracle Home Name [1] Oracle_Client10g
Path [1] c:\PROGRA~2\Oracle102
TNS Path [1]
OCI-DLL [1]
OCI-Client-DLL [1]
OCI-Version [1]
OCI-CallStyle [1] None
Possible CallStyles [1]
Oracle Home Name [2] InstantClient1
Path [2] c:\Program Files (x86)\Oracle102
TNS Path [2]
OCI-DLL [2] c:\Program Files (x86)\Oracle102\BIN\oci.dll
OCI-Client-DLL [2] c:\Program Files (x86)\Oracle102\BIN\oraclient10.dll
OCI-Version [2] 10.2.0.5.0
OCI-CallStyle [2] OCI80
Possible CallStyles [2] OCI73; OCI80
.
Session 1 MainOracleSession (OratoolMainForm)
Connect *****
HomeName
OracleVersion 10.2.0.5.0
InTransaction False
Connected True
AutoCommit True
Pooling False
Schema *******
Options.CharLength 0
Options.Charset
Options.ClientIdentifier
Options.ConvertEOL True
Options.ConnectionTimeOut 0
Options.DateFormat DD.MM.RR
Options.DateLanguage GERMAN
Options.DefaultSortType stBinary
Options.Direct False
Options.EnableBCD False
Options.EnableFMTBCD False
Options.EnableIntegers True
Options.EnableLargeInt False
Options.EnableNumbers False
Options.LocalFailOver False
Options.Net False
Options.NeverConnect False
Options.OptimizerMode omDefault
Options.StatementCache False
Options.StatementCacheSize 20
Options.SubscriptionPort 0
Options.UseOCI7 False
Options.UnicodeEnvironment True
Options.UseUnicode True
Any ideas???
With kind regards
Jens Fudickar