Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

Re: Could not Delete HFSQL (Classic) folder

$
0
0
Hello,

Would like to delete a folder where hfsql - classic files are stored. I do read those files first then give the user the option to delete the folder altogether. I get the following error.

Unable to delete <D:\New Folder> directory. Check whether you have sufficient rights and whether all the files are closed.

My code to delete

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
WHEN EXCEPTION IN
HClose("*")
HCloseConnection(a360_DataBaseConnection)
DO
Info("HFSQL error while closing connections: " + HError() + HErrorInfo())
a360TransactionCancel(a360_DatabaseConnectionType, a360_ClassicDatabaseTRS, p_sErrorMessage)
RESULT False
END

e_resdelete = fRemoveDir(CompleteDir(a360_classicDir) + p_sCompanyFolder, frRecursive)
IF e_resdelete = False THEN
Info("Directory could not be removed. Check whether you have sufficient rights" + ErrorInfo())
RESULT False
END

// OK Return True
RESULT True

////////////////////////////////////////////////////////////////////////////////////

I get error while executing fRemoveDir command. Seems some files are still open that the folder could not be deleted.

When the folder is deleted from Windows explorer or command prompt, after closing the package, it deletes without any issues.

Would like to know what else I'm missing?

Happiness Always
BKR Sivaprakash

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>