Hi
I have set up an initial test by using just the first part of the daily ETL run –
As you can see I just added a script object and copied in your code and added the <file_id> into the file name in the extract object.
However, when I run the package I get an error in the script “Too many actual parameters”
I cannot see what it is referring to or what I have done to cause this error?
Could you please assist as I am trying to get this up and running for testing this week.
var FileHandle: Integer;
FileName: string;
I: Integer;
Begin
FileName:='c:\1.txt';
if FileExists(FileName) then
begin
FileHandle:=FileOpen(FileName,fmOpenReadWrite);
FileRead(FileHandle,I,4);
I:=I+1;
FileSeek(FileHandle,0,0);
FileWrite(FileHandle,I,4);
FileClose(FileHandle);
end
else
begin
I:=1;
FileHandle:=FileCreate(FileName,fmOpenWrite);
FileWrite(FileHandle,I,4);
FileClose(FileHandle);
end;
SetVariable('<file_id>',inttoStr(I));
Result:=I;
end;
Regards,
Chris