Hi,
we want to Import a csv-file with a xmlport. The Import works fine but I have to choose the file every time. The file is always stored in the same folder. So we want to press the button and the import starts without a query.
Here is the code for the button on a page.
procedure ImportXML()
var
ImportXmlFile: Text;
XmlINStream: InStream;
IsImported: Boolean;
xmlPort: XmlPort 50100;
begin
ImportXmlFile := 'C:\Users\xxx\Desktop\test.csv';
UploadIntoStream('Import', '', '', ImportXmlFile, XmlINStream);
xmlPort.SetSource(XmlINStream);
IsImported := Xmlport.Import;
if (IsImported = true) then
Message('The import from XML is complete.')
else
Message(GetLastErrorText);
end;
}
How can we make it work, that we can import the file without a query. I have already tried different things but nothing works.