作者hfnadkv (冲冲冲)
看板java
标题[问题] JDBF连结问题
时间Thu Jan 17 16:33:53 2008
昨天发问过,但因为说明过於简单,加上刚才又找到中文的说明档
所以重po一次
因为要连*.dbf的档案
所以找了JDBF这个套件来用
http://www.svcon.com/jdbf/docs/index.html
中文说明档:
http://tinyurl.com/3xd57n
但执行下面程式时,一直是出现错误(JDBFException指出找不到档案)
不知哪个环节出错了?!谢谢大大解答
Exception in thread "main" java.lang.Error:
Unresolved compilation problem:
Unhandled exception type JDBFException at testReadDBF3.main(testReadDBF3.java:
13)
import com.svcon.jdbf.DBFReader;
public class testReadDBF{
public static void main(String[] args) {
DBFReader test = new DBFReader("db/Book1.dbf");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
指向这里
System.out.println (test.getFieldCount()); //算出有几个栏位
}
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 134.208.29.133
※ 编辑: hfnadkv 来自: 134.208.29.133 (01/17 16:35)
1F:推 superlubu:DBFReader constructor throws JDBFException 01/17 16:57
2F:→ superlubu:而你没有 catch 也没有在 main method 定义 throws out 01/17 17:00
3F:推 TonyQ:-3-;; 回太久了....没看到楼上已经回了XD 01/17 17:36