SAP Knowledge Base Article - Preview

2019986 - ImportFile function will return an error -1 to empty file

Symptom

When you import an empty file using the ImportFile function, you will receive a wrong return value.
Empty file is a file size of 0 bytes.

Manual is written as follows for the return value.
However, ImportFile function returns -1.

----------------------------------------------

PowerBuilder 12.5.2 > PowerScript Reference > PowerScript Functions

ImportFile

Returns

Long. Returns the number of rows that were imported if it succeeds and one of the following negative integers if an error occurs:

  • -1 No rows or startrow value supplied is greater than the number of rows in the file
  • -2 Empty file

-----------------------------------------------


Read more...

Environment

  • SAP PowerBuilder 12 SP01
  • SAP PowerBuilder 12.5 SP02

Product

SAP PowerBuilder 12.5

Keywords

CR, 733968, DataWindow , KBA , BC-SYB-PB , PowerBuilder , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.