I am trying to delete a database using the following code.
[code] dim result as integer
result = msgbox (“Are You Sure you want to DELETE the DATABASE ?”,36)
if result=6 then
golfer.close ******** PROBLEM HERE
Dim f as Folderitem
f=SpecialFolder.ApplicationData.Child(“TGC”).Child(“Golf”).Child(“golfer.rsd”)
f.Delete()
If f.LastErrorCode > 0 then
MsgBox Str(f.LastErrorCode)
Else
MsgBox “DataBase Deleted, Program must be Restarted to Create NEW Database”
window.close
End if
exit
end if[/code]
I keep getting the following, the file golfer.rsd Does exist in the correct Directory
NilObjectException
F Nil
Me Bevelbutton
Result 6