Hello all,

So, does db.databasefile.delete work? Assuming the folderitem
db.databasefile is a valid file. The file db.Databasefile is created
when the window opens. It is a REALSQLDatabase file. I figured I'd
just delete the file if the user presses the cancel button instead of
saving.

In the Action event of the Cancel button on a window of mine I tried this code:

   if isNewFile then //  isNewFile is a Boolean that is set when the
window opens

     db.DatabaseFile.Delete
     self.Close

   end if

Nothing happens. The file is stil in the folder. To check myself, I
changed the code to this:

if isNewFile then

     db.DatabaseFile.Name="MustDelete"

// the name of the file changes.

     db.DatabaseFile.MoveFileTo(TrashFolder)

//the file is moved into the trash folder

     self.Close

   end if

So, my file really is there and I can use the other folderitem methods
and properties on it. But not .delete.

I tried this code in a button:

   Dim f As New Folderitem
   f=GetFolderItem("mytestfile.rtf") // I created this file and put
it into my app folder
   f.Delete

That code works - the file is deleted.

My question is: Am I doing something wrong with the .Delete method?
Does it matter that the file is a database file? Bug?

Thanks,
--
Sean McCollum
Mac OS 10.4.7
RB 2006 r3 Pro
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to