Deleting a database

chris_visible

Registered User.
Local time
Today, 18:11
Joined
Jan 17, 2002
Messages
24
Is it possible to delete an unopen database on the click of a buttonin visual basic?
Thanks
 
It's the same command that deletes any file -

From help:

"Deletes files from a disk.

Syntax

Kill pathname

The required pathname argument is a string expression that specifies one or more file names to be deleted. The pathname may include the directory or folder, and the drive.

Remarks

Kill supports the use of multiple-character (*) and single-character (?) wildcards to specify multiple files.

An error occurs if you try to use Kill to delete an open file.

Note To delete directories, use the RmDir statement."
 
Thanks for the suggestion. The kill statement did not work with .mdb files so i need to find another way around my problem(in tables forum as 'file description').
Thanks
 
I don't know why you are having a problem but the "Kill" statement will delete "any" file as long as it is not open at the time of execution.

RDH

[This message has been edited by R. Hicks (edited 02-14-2002).]
 
Yes your right, my problem was that the variable representing the name of the database had changed when I ran the kill line. I have sorted it now by making it constant. Thanks
Chris
 

Users who are viewing this thread

Back
Top Bottom