在写Java web的时候,连接sqlite数据库,我是直接创建数据库然后连接,
 
代码是:
 
String sDBDriver = "org.sqlite.JDBC"; private String url = "jdbc:sqlite:Student.db";   
 
然后就出现了问题 ,在查询的时候, 找不到数据库中表。
 
后来才发现是数据库的路径问题,要写成绝对路径。
 
然后url被我改成了: private String url = "jdbc:sqlite:E://workspace//StudentSystem//Student.db";  又出现了错误,说的是 out of  memory。
 
然后在知乎上找到解决办法,把url改成了如下:
 
private String url = "jdbc:sqlite://e:/workspace/StudentSystem/Student.db"
 
 
 
就解决了。