SQLiteDatabase.RemoveDatabase

From Xojo Documentation

Method

SQLiteDatabase.RemoveDatabase(databaseName As String)

Supported for all project types and targets.

Removes the passed database that was previously added with AddDatabase.

Example

This example removes as previously added database:

Var DBFile As New FolderItem("MyDB.sqlite")

Try
currentDB.AddDatabase(attachDBFile, "locations")
MsgBox("Database attached.")
// Queries against the attached database would be prefixed with "locations", such as
// SELECT City FROM locations.Addresses WHERE ST = 'TX'
// When you are finished, you can detach the database
currentDB.RemoveDatabase("locations")
Catch error As IOException
Msgbox("The database could not be added.")

Catch error As DatabaseException
Msgbox("The database could not be removed."
End Try