SAP Knowledge Base Article - Preview

2019986 - ImportFile 関数の使用時に空のファイルに対してエラー -1 が返される

Symptom

ImportFile 関数を使用して空のファイルをインポートした際に、不適切な戻り値が返されます。
空のファイルとは、ファイルサイズが 0 バイトのファイルです。

マニュアルには、戻り値について以下のように記載されています。
しかし、ImportFile 関数によって -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 (Long 型。正常に終了した場合は、インポートされた行数を返し、エラーが発生した場合は、次の負の整数のうちの 1 つを返します):

  • -1 No rows or startrow value supplied is greater than the number of rows in the file (行がないか、指定された startrow 値はファイル内の行数を超えています)
  • -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.