我在加载包含长字段的CSV文件时遇到问题。我使用SetRecTerminator属性加载长字段的空白行。问题在于,仅加载第一行,并且文件具有800多个行。
代码是:
&FILE1.SetFileLayout(FileLayout.GB_CRG_ARB_FL);
If &FILE1.IsOpen Then
/* set the terminator to be NOCRLF */
Local string &Term = "NOCRLF";
&FILE1.SetRecTerminator(&Term);
&RS1 = &FILE1.CreateRowset();
&RS = CreateRowset(Record.GB_CRG_ARB_TBL);
&SQL1 = CreateSQL("%Insert(:1)");
&RS1 = &FILE1.ReadRowset();
While &RS1 <> Null;
ImportSegment(&RS1, &RS);
&RS1 = &FILE1.ReadRowset();
End-While;
End-If;
&FILE1.Close();
预先感谢