SQLiteDatabase.DetachDatabase
From Xojo Documentation
This item was deprecated in version 2019r2. Please use SQLiteDatabase.RemoveDatabase as a replacement. |
Method
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
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