slqite3 issue
Posted
#1
(In Topic #1181)
Trainee
Dim $con As New Connection
Try $con.Close()
$con.Type = "sqlite3"
$con.host = "./"
$con.name = "Invoices.db"
$con.Open
I get the message "Unable to locate database 'invoices.db' in ./"
I have the database file in the directory where the program resides.
What am i doing wrong? Any help is appreciated.
Thanks
Posted
Guru

$con.host = Application.Path
I'd use the ./ path only for reading files, for writing (or other uses, i guess db) then i'd use Application.Path
Posted
Regular

- You CANNOT write to a database inside the executable(nor any other file inside the executable.) The database must exist outside the executable.
- As Bruce says you must use a FULL path to the sqlite file. Read up up on how Gambas uses relative paths.
1 guest and 0 members have just viewed this.


