Dim DB As SQL
Dim Dir As String = File.DirRootExternal
DB.Initialize(File.DirRootExternal, "db1.db", True)
' Only to be sure that db2.db will be created by the Attach command
If File.Exists(Dir, "db2.db") Then
File.Delete(Dir, "db2.db")
End If
DB.ExecNonQuery("ATTACH DATABASE '" & File.Combine(Dir, "db2.db") & "' AS db2")
Dim Cur As Cursor
Cur = DB.ExecQuery("PRAGMA database_list")
If Cur.IsInitialized Then
For p = 0 To Cur.RowCount -1
Cur.Position = p
For c = 0 To Cur.ColumnCount-1
Log(c & TAB & Cur.GetString2(c))
Next
Next
Else
Log("not initialized")
End If