SQLite revOpenDatabase() and Relative File Paths

Devin Asay devin_asay at byu.edu
Thu Feb 20 10:34:57 EST 2014


On Feb 19, 2014, at 10:54 PM, Kay C Lan <lan.kc.macmail at gmail.com> wrote:

> This works
> 
> put the defaultFolder & "/Folder Name/mySQLite.db" into tPath
> get revOpenDatabase("sqlite",tPath,,,)
> 
> But this doesn't
> 
> get revOpenDatabase("sqlite","/Folder Name/mySQLite.db",,,)
> 
> I thought the point of the defaultFolder was so you didn't have to
> continually build full file paths but could use relative file paths when LC
> needed a path.
> 
> What am I doing wrong?

Kay,

You don't need the leading "/" in the relative file path. With the defaultFolder set to the parent folder of Folder Name, you simply use "Folder Name/mySQLite.db" as the path.

Regards,

Devin

Devin Asay
Office of Digital Humanities
Brigham Young University





More information about the use-livecode mailing list