I am getting an "Invalid Argument" when I drop a TOraSQL, a TOraSession, and a TSmartQuery on a form and then try to run the following code:
Code: Select all
procedure TForm5.FormCreate(Sender: TObject);
var
i: Integer;
ArrayLength: Integer;
begin
OraSession1.Username := 'JDORLON';
OraSession1.Password := 'jdorlon';
OraSession1.Server := 'ORCL12';
OraSession1.LoginPrompt := False;
OraSession1.Connect;
SmartQuery1.sql.add('drop table ts_test');
try
SmartQuery1.execute;
except
end;
SmartQuery1.sql.clear;
SmartQuery1.sql.add('create table ts_test (a_ts timestamp(6))');
SmartQuery1.execute;
ArrayLength := 3;
OraSQL1.ArrayLength := ArrayLength;
OraSQL1.sql.add('insert into ts_test (a_ts) values (:Param1)');
OraSQL1.ParamByName('Param1').DataType := ftOraTimeStamp;
OraSQL1.ParamByName('Param1').ParamType := ptInput;
for i := 1 to ArrayLength do
OraSQL1.ParamByName('Param1').ItemAsTimeStamp[i].Construct(2016, 2, 8, 9, 46, 30, 1, '');
OraSQL1.execute(ArrayLength);
SmartQuery1.sql.clear;
SmartQuery1.sql.add('commit');
SmartQuery1.execute;
end;
Am I doing something wrong or is this a bug?
Delphi XE2, compiling in 32 bit
Oracle Client 12.1.0.2
Oracle Server 12.1.0.2
ODAC version 9.6.22