I have a problem with DirectPathloader
when executing following code I will get a
ORA-01841 (year < -4713 or zero or >+9999)
Row =0, Column = 1error in the sourcecode line of 'Ldr.Load(Row);'
/Fill the array
for i := 0 to .... do
begin
resarray[i].dts:=formatdatetime('dd.mm.yyyy hh:nn:ss',dt); //String
...
end;
...
ldr.DateFormat:='DD.MM.YYYY HH24:MI:SS';
ldr.Column[1].DataSize:=21;
ldr.Column[1].DateFormat:='DD.MM.YYYY HH24:MI:SS';
for i := 0 to length(Resarray) - 1 do
begin
...
ldr.Column[1].SetData(Row, @Resarray[i].dts[1], length(Resarray[i].dts));
...
Inc(Row);
// We have filled the array, or we are at the end of the file: load it
if (Row = Ldr.MaxRows) or (i = length(Resarray) - 1) then
begin
try
Ldr.Load(Row);
except
on E:EOracleError do
begin
showmessage(E.Message + #13#10#13#10 +
...
The date format of the loader is set correct and also the dateformat in the field. The resarray[i].dts contains strings like '01.07.2012 00:00:00'. There are no constraints in the table.
What could be the problem?