SQLiteDatabase.DetachDatabase

From Xojo Documentation

Method

SQLiteDatabase.DetachDatabase(databaseName As String)

Supported for all project types and targets.

Detaches the passed database that was previously attached with AttachDatabase.

Example

This example detaches as previously attached database:

Dim attachDBFile As New FolderItem("AttachDB.sqlite")

If currentDB.AttachDatabase(attachDBFile, "locations") Then
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.DetachDatabase("locations")
End If