lck ldb

当要设置是否是可读或者是隐藏时,在java中除了提供File.setReadOnly()外,就无其他方法了
你可以在java中用Runtime.getRuntime().exec( "attrib " + "\ " " + file.getAbsolutePath() + "\ " "+ " +R ")该方法可以实现



http://answers.yahoo.com/question/index?qid=1006042717221

If you do a Compact and Repair within Access, this should solve the problem. Go to TOOLS > DATABASE UTILITIES > Compact and Repair Database.


Asp.Net web applications run under the ASPNET windows user account. When your code tries to open the connection Access creates the LDB file. Therefore ASPNET has to have write\create\modify permissions on the folder where you database exists. So, you'll need to change those settings if you have access to the server. If it's a hosting company you'll need to have them change it for you.


The way to get rid of this probleme you should be looking to close connection to the database other wise you will have those lck files on your computer.



http://www.diybl.com/course/3_program/java/javajs/20100719/459320.html

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@afdb14ea[file =D:\db\human.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: 另一个程序已锁定文件的一部分,进程无法访问。 : D:\db\human.lck

原写法:

def sql = Sql.newInstance("jdbc:hsqldb:file:d:/db/human;ifexists=true", "sa",
"", "org.hsqldb.jdbcDriver")

正确写法:

def sql = Sql.newInstance("jdbc:hsqldb:hsql://localhost/xdb;ifexists=true", "sa",
"", "org.hsqldb.jdbcDriver")


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值