Please tell me, if this is a bug and if so when it will be fixed. Thanks.
Code: Select all
procedure TTestLoaderNet.TestLoadTable;
const
CTable = 'TestLoader';
var
lSession: TOraSession;
lLoader: TOraLoader;
begin
lSession := TOraSession.Create(nil);
try
lSession.Options.Net := true;
lSession.Username := //user name;
lSession.Password := //password;
lSession.Server := //enter server address here;;
lSession.Connect;
Assert(lSession.Connected, 'connected');
try
lSession.ExecSQL(
'CREATE TABLE ' + CTable + ' (' +
'FI INTEGER' +
')', []);
except
on E: EOraError do begin
if (E.ErrorCode = 955) then //table exists
lSession.ExecSQL('DELETE FROM ' + CTable, [])
else
raise;
end;
end;
lLoader := TOraLoader.Create(nil);
try
lLoader.Session := lSession;
lLoader.TableName := CTable;
lLoader.OnPutData := PutData;
//BUG: can't load if Net = True (datatype is not supported)
//TOraLoader: Prepare: OCIHandleAlloc ->
//Res: OCI_INVALID_HANDLE
lLoader.Load;
finally
FreeAndNil(lLoader);
end;
finally
FreeAndNil(lSession);
end;
end;
procedure TTestLoaderNet.PutData(Sender: TOraLoader);
var
Row: Integer;
begin
for Row := 1 to 10 do begin
Sender.PutColumnData(0, Row, { FI } Row);
end;
end;