>> On 2/2/2011 8:03 PM, BareFeetWare wrote: >> I use the attach command to attach another SQLite database file that resides >> in the same directory as my main file. I tried: >> >> attach 'Import.sqlitedb'; >> >> But it fails to find the file. If I specify the full path: >> >> attach '/Users/tom/Documents/Work/Databases/Import.sqlitedb'; >> >> Then it works.
> On 03/02/2011, at 12:15 PM, Igor Tandetnik wrote: > > Just as with any command line utility, relative paths are resolved relative > to the current working directory. Just start sqlite3 in such a way that the > directory where your database files reside is the current one. Read the fine > manual for your shell of choice. I'm not using the command line utility, though my question would equally apply there. >> How can I attach to a local file in the same directory, without specifying >> the full absolute path? > > How did you manage to open the main file in the first place? Specify the path > to the second file in the same manner. I could be using any SQLite utility, whether the command line, SQLite Manager, Froq etc. I happen to be using my own app, developed for the iPad/iPhone. In any of these environments, I open my main SQLite data file, then want to run an SQL script/procedure which starts with an attach command. I don't want to and usually can't edit the script each time to insert a different path in the attach file name. Thanks, Tom BareFeetWare -- Comparison of SQLite GUI tools: http://www.barefeetware.com/sqlite/compare/?ml _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users