hxtt DBF 驱动程序锁定其文件
我的网络应用程序接收存档,将其解压到临时文件夹,从提取的 DBF 中读取数据,然后应该清除垃圾。尽管它无法杀死临时文件夹,因为其中的 DBF 文件被锁定。这是示例代码:
<代码> public static void main( String a[] ) 抛出异常 {
Class.forName( "com.hxtt.sql.dbf.DBFDriver" ).newInstance();
String url = "jdbc:DBF:/C:/TEMP/";
Properties properties = new Properties();
properties.setProperty( "charSet", "cp866" );
Connection con = null;
Statement st = null;
java.sql.Driver d = null;
con = DriverManager.getConnection( url, properties );
d = DriverManager.getDriver( url );
st = con.createStatement();
ResultSet rs = st.executeQuery( "SELECT * FROM 6QQQ201010" );
rs.close();
st.close();
con.close();
<代码>}
我将断点放在最后一行之后,6QQQ201010.DBF 仍然被锁定。有什么想法吗?或者只是驱动程序中的一个错误?
My web app receives archive, unpacks it to temp folder, reads data from extracted DBFs and then should kill garbage. Though it fails to kill temp folder since DBF files in it are locked. Here is a sample code:
public static void main( String a[] ) throws Exception
{
Class.forName( "com.hxtt.sql.dbf.DBFDriver" ).newInstance();
String url = "jdbc:DBF:/C:/TEMP/";
Properties properties = new Properties();
properties.setProperty( "charSet", "cp866" );
Connection con = null;
Statement st = null;
java.sql.Driver d = null;
con = DriverManager.getConnection( url, properties );
d = DriverManager.getDriver( url );
st = con.createStatement();
ResultSet rs = st.executeQuery( "SELECT * FROM 6QQQ201010" );
rs.close();
st.close();
con.close();
}
I put breakpoint past last line and 6QQQ201010.DBF is still locked. Any ideas? Or just a bug in the driver?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加properties.setProperty( "delayedClose", "0" );司机会立即关闭手柄。
Add properties.setProperty( "delayedClose", "0" ); and driver would close handles imediately.