Java数据库“在第1行的意外位置读取文件结尾”。 [英] Java database "read end of file at unexpected place on line 1. "
本文介绍了Java数据库“在第1行的意外位置读取文件结尾”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
查询是
the query is
CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE
(null,'ADDED','D:\added.del',';','%',null,0);
ADDED是表名
added.del的内容是
ADDED is the table name
the contents for added.del are
Aigreur ; Sourness ; word ; add
使用added.del文件添加了几条记录,但是这条特殊记录没有添加而且rror是
added several records with the added.del file but this particular record does not add and the rror is
"Read end of file at unexpected place on line 1. "
我尝试了什么:
更改了代码,添加了半冒号并更改了added.del
What I have tried:
changed the code, added semi colons and changed added.del
推荐答案
错误消息告诉您解析输入文件时出错:
解析器已读取到文件末尾但预计会有更多数据存在。
使用单行数据可能有两个原因:
The error message tells you that there was an error parsing the input file:
The parser has read up to the end of the file but expects more data to be present.
With your single line data there might be two reasons:
- 该行不会被换行终止,而使用的
SYSCS_UTIL.SYSCS_IMPORT_TABLE
实现不够智能,不允许在最后一行丢失换行符。
- 该表有四列以上
- The line is not terminated by a newline and the used
SYSCS_UTIL.SYSCS_IMPORT_TABLE
implementation is not smart enough to allow a missing newline on the last line.
- The table has more than four columns
这篇关于Java数据库“在第1行的意外位置读取文件结尾”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文