http://gambaswiki.org/bugtracker/edit?object=BUG.1108&from=L21haW4-
Comment #2 by Tobias BOEGE:
You forgot to set $conexionsqli.Host = Application.Path before calling
Databases.Add(). (Where did you expect the database to go without giving it a
host?) Try this:
Public Function getConexion()
' Clear directory
Try Kill Application.Path & "/test"
$conexionsqli = New Connection
$conexionsqli.Type = "sqlite3"
' "Connect" to the host (i.e. the directory where we create the database)
$conexionsqli.Host = Application.Path
' There is no database yet, so set Name = Null
$conexionsqli.Name = Null
$conexionsqli.Open()
' Add the database and close the connection
$conexionsqli.Databases.Add("test")
$conexionsqli.Close()
' Afterwards we can select the now-existing database
$conexionsqli.Name = "test"
$conexionsqli.Open()
End
Tobias BOEGE changed the state of the bug to: Invalid.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user