borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Exporting Table from MS Accedd to XML using VB6)Next Topic (Best Alternative to Trim()) New Topic New Poll Post Reply
AndreaVB Forum : VB General : I could not delete the file
Poster Message
wen_dell
Level: Scholar

Registered: 17-01-2005
Posts: 44

icon I could not delete the file

i could not figure out why the DBF that i trying to delete raised an error of "Permission denied" even though i closed the recordset and connection for that DBF file and set their variables to nothing. Can anybody help me with this problem


Dim CnFox As New ADODB.Connection
Dim RsCur As New ADODB.Recordset
Dim iFile As New FileSystemObject

CnFox.Open "Provider=MSDASQL.1; Driver={Microsoft Visual Foxpro Driver}; SourceType=DBF; SourceDB=" & App.Path & "; Exclusive=No;"
RsCur.Open "SELECT * FROM CurrentItemMast ORDER BY StockNo", CnFox, adOpenForwardOnly, adLockReadOnly

'my codes
'
'
'


RsCur.Close
CnFox.Close
Set RsCur = Nothing
Set CnFox = Nothing

iFile.DeleteFile App.Path & "\CurrentItemmast.dbf", True
'or
'Kill App.Path & "\CurrentItemmast.dbf"
Set iFile = Nothing


[Edited by wen_dell on 25-07-2007 at 05:45 PM GMT]

____________________________
GOD IS MY SHEPERD

25-07-2007 at 09:30 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : I could not delete the file
Previous Topic (Exporting Table from MS Accedd to XML using VB6)Next Topic (Best Alternative to Trim()) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder