[Gambas-user] [Gambas Bug Tracker] Bug #1108: sqlite path when used with name does not create db in the given path
bugtracker at ...3416...
bugtracker at ...3416...
Wed May 24 16:49:48 CEST 2017
http://gambaswiki.org/bugtracker/edit?object=BUG.1108&from=L21haW4-
Comment #1 by PICCORO LENZ MCKAY:
the piece of code its:
Private $conexionsqli As Connection
Public Function getConexion()
Try Kill Application.Path & "/test" ' clean the patch firts
$conexionsqli = New Connection
$conexionsqli.Type = "sqlite3"
$conexionsqli.Name = Null ' doc said if null given memory db will be used and i create a db from now
Try $conexionsqli.Open
$conexionsqli.Databases.Add("test") ' so connected to memory db create a new db in given path ? how can i set the path? if the db arememory db?
$conexionsqli.Close ' doc say: Otherwise, Host gives the database directory, and the database path is the result of concatenating Host and Name.
$conexionsqli.Host = Application.Path
$conexionsqli.Name = "test"
Try $conexionsqli.Open
If Error Then
$conexionsqli = Null
Endif
'Return $conexionsqli
End
More information about the User
mailing list