talor swift red:在VB中用ado操作完对dbf文件的写入后,怎么才能释放VB程序对dbf的占用.

来源:百度文库 编辑:中科新闻网 时间:2024/04/29 04:17:00
在VB程序中,对一个目录下的dbf文件进行操作后,没有退出VB程序,想直接打开(或移动)该dbf,查看结果,但是权限总被拒绝。只有在VB程序退出后,才可以打开该dbf文件。。

请教,,在VB程序不退出的情况下,怎样去另外操作这个dbf文件呢?是在打开该dbf的连接串中有参数么?
谢谢
我使用过
ado.close
set ado=nothing
还是不行,只有关闭VB应用程序后才能打开DBF文件,你们可以试试看的。

if ado.state=adstateopen then
ado.close
end if
set ado=nothing

dim Conn as new adodb.connection
COnn.open
conn.close

ado.ConnectionString = "......"
ado.Open
..
..
..

ado.Close