PDA

View Full Version : location of sqlite database?



kwaugh
November 14th, 2009, 09:55 AM
Is it possible to have the database in a different location from the gml making the connection?

For example this works like a charm if the db file is in the same location as the gml

local env = luasql.sqlite3();
local con = assert( env:connect("xloc"))

this gives an error that there is no such table if you try to execute sql against a table in the db

local env = luasql.sqlite3();
local con = assert( env:connect("c:\xloc"))

in this case xloc is in a different directory than the gml making the call.

Any thoughts? ideally, I'd like to store my db's in a central directory...

Thanks!

K

blubberhoofd
November 14th, 2009, 06:21 PM
use "c:\\xloc" instead the "\" is an escape character ;)

kwaugh
November 15th, 2009, 04:01 PM
Doubling up the slashes gets me every time!

Thanks!

K