My program has an edit field to enter a database name, which in my rough draft I don't edit check, then the program either creates or loads the file depending upon whether the file exists.
'=============================================================================
Public Sub CreateDatabaseFile(ArgDirName As String, ArgFileName As String)
Dim theDB As Connection = New Connection
With theDB
.Type = "sqlite3"
.Host = ArgDirName
.Name = ""
.Open()
.Databases.Add(ArgFileName)
.Close
End With
End
'=============================================================================
Public Sub OpenDatabase(ArgDirName As String, ArgFileName As String)
With MyDB
.Type = "sqlite3"
.Host = ArgDirName
.Name = ArgFileName
.Open()
End With
End
'=============================================================================
Here is the weird part, trying to add a filename in the create routine with any special character, except underscore, doesn't work. However, if you give it a plain name, rename the file externally, the open routine works just fine.Before I code a workaround, e.g. create a plain named file and rename it, I'd like to know if there is something going on that I am not aware of. I haven't done that much DB programming in Gambas.
Thanks,
Ced