p$tdv:sql:csv_lesen
p$tdv:sql:csv_lesen
This function reads any number of data records from a CSV file into an indexed parameter group. The first line of the CSV file must contain the column names. If these contain characters that are not allowed as parameter names in ePOS, they will be replaced by _. The name of the parameter group must be specified without an index. If the columns of the CSV file and the parameters of the parameter group do not match, the parameter group is extended by the missing parameters. Read until the end of the file. The size of the parameter group is adjusted independently. This happens at intervals. The size of the parameter group can be greater than the number of lines read.
Syntax: | Result = p$tdv:sql:csv_lesen( CSV_File , CSV_Delimiter , 'PGName' , 'Meldung' ) | |||
| Argument | Typ | Bedeutung | |
| CSV_File | string | Name of the CSV file incl. Path | |
| CSV_Delimiter | string | Separator of the columns. For example, ; | |
| PGName | string | The name of the indexed parameter group to fill. | |
| Meldung | string | The name of the parameter on which a message is written, if the reading is not successful. | |
Result: | int | Number of records read or error status: -1: the file can not be opened | ||