Only determine of SQLite DB exists or is accessible

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bmcgonag
Posts: 40
Joined: Thu Mar 13, 2014 6:51 pm

Only determine of SQLite DB exists or is accessible

Post 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.
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Only determine of SQLite DB exists or is accessible

Post 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
bmcgonag
Posts: 40
Joined: Thu Mar 13, 2014 6:51 pm

Re: Only determine of SQLite DB exists or is accessible

Post by bmcgonag »

Perfect! You Rock!
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Only determine of SQLite DB exists or is accessible

Post by Klaus »

bmcgonag wrote:You Rock!
I actually and really do: http://www.major-k.de/bass/

Rock'n'Roll! :D
Post Reply