From Xojo Documentation

Revision as of 19:32, 18 February 2022 by Gperlman (talk | contribs) (Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

SQLiteDatabase.RemoveDatabase(databaseName As String)

Supported for all project types and targets.

Removes the passed database that was previously added with AddDatabase.


This example removes as previously added database:

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

currentDB.AddDatabase(attachDBFile, "locations")
MessageBox("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
Catch error As IOException
MessageBox("The database could not be added.")

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