用ado打开过的dbf文件无法删除?下面的程序执行到最后一句会报错:“拒绝的权限” Set rs = New ADODB.Recordset
Set cn = New ADODB.Connection
strCn = "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=" & App.Path & _
";Exclusive=No"
cn.Open strCn
strSql = "select * from tmp.dbf "
rs.Open strSql, cn, adOpenStatic, adLockReadOnly
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
kill App.Path & "\tmp.dbf"
Set cn = New ADODB.Connection
strCn = "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=" & App.Path & _
";Exclusive=No"
cn.Open strCn
strSql = "select * from tmp.dbf "
rs.Open strSql, cn, adOpenStatic, adLockReadOnly
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
kill App.Path & "\tmp.dbf"
你是不是在海运行者的你的程序的时候,进行删除的
你可以关闭你的程序后在删
实在不行,就将ado 的datasource 设为空