Page 1 of 1

Only determine of SQLite DB exists or is accessible

Posted: Sun Jul 27, 2014 7:29 pm
by bmcgonag
I need to determine if a SQLite db exists or is accessible. I don't want to just create it if it doesn't, but instead prompt the user before creating it.

I've searched around a bit, and can't figure out how to do this. Any help is greatly appreciated.

Re: Only determine of SQLite DB exists or is accessible

Posted: Sun Jul 27, 2014 9:05 pm
by Klaus
Hi bmcgonag,

that's an easy one:

Code: Select all

...
put "path/to/presumed/database.db" into tDBFile
if there is NOT a file tDBFile then
  ## db file not present, take action!
end if
...
:D


Best

Klaus

Re: Only determine of SQLite DB exists or is accessible

Posted: Sun Jul 27, 2014 9:52 pm
by bmcgonag
Perfect! You Rock!

Re: Only determine of SQLite DB exists or is accessible

Posted: Sun Jul 27, 2014 11:15 pm
by Klaus
bmcgonag wrote:You Rock!
I actually and really do: http://www.major-k.de/bass/

Rock'n'Roll! :D