> Just a quick note though, when I move the .exe file to the desktop and 
> double-click on it, it crashes, which suggests that the bin/debug location is 
> only applicable when the application is run from within the IDE.

Crash is probably because your desktop folder doesn't have db
subdirectory where you want your database to be created. All relative
paths are always relative to the current directory, not to the place
where EXE file is located or where it was built.


Pavel


On Mon, Feb 20, 2012 at 10:11 PM, Agrawal, Manish <magra...@usf.edu> wrote:
> Ah, I should have thought of that.
>
> When I run the application (Ctrl+F5), the path is created in bin/debug. This 
> is also the folder where the .exe file is created.
>
> Just a quick note though, when I move the .exe file to the desktop and 
> double-click on it, it crashes, which suggests that the bin/debug location is 
> only applicable when the application is run from within the IDE.
>
> Thanks
> Manish
>
> -----Original Message-----
> From: sqlite-users-boun...@sqlite.org 
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin
> Sent: Monday, February 20, 2012 9:51 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Relative path to sqlite database
>
>
> On 21 Feb 2012, at 2:49am, "Agrawal, Manish" <magra...@usf.edu> wrote:
>
>> All the sqlite examples I see use absolute paths to the sqlite database in 
>> Visual Studio projects, e.g. "C:\users\test\apps\db\test.db3".
>>
>> How can I specify the path to the sqlite database relative to the 
>> application root folder, e.g. "db\test.db3"?
>
> Have you tried specifying a filename without a path, just to see where the 
> file ends up ?
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to