[Mono-list] Where does Mono.Data.Sqlite create its database file?

Jorge Bastos mysql.jorge at decimal.pt
Mon Apr 28 06:19:50 EDT 2008


I tried this and the filename was created in the directory where it was
runned.



> -----Original Message-----
> From: mono-list-bounces at lists.ximian.com [mailto:mono-list-
> bounces at lists.ximian.com] On Behalf Of Agro Rachmatullah
> Sent: segunda-feira, 28 de Abril de 2008 11:04
> To: mono-list at lists.ximian.com
> Subject: [Mono-list] Where does Mono.Data.Sqlite create its database
> file?
> 
> Please look at this program:
> 
> http://pastebin.com/f100ca875 (mono and os info there)
> 
> In short, this program creates an SQLite database, creates a table
> inside it, populates the table, and finally reads the rows.
> 
> In particular, take note of the connection string:
> 
> conn = new SqliteConnection("Data Source=file:supernew.db");
> 
> The program works, however I didn't find any "supernew.db" in the
> application's directory. Running a full search on my hard disk also
> returns no such file. However, running the program for the second time
> gives me "table foo already exists" exception, which shows that the
> file must exist somewhere! Where is it located and what is it named?
> 
> PS: Using "URI=file:supernew.db" as the connection string gives the
> expected result. That is, the file "supernew.db" will be created in
> the application's directory. However using "URI" for the connection
> string is deprecated according to http://www.mono-project.com/SQL_Lite
> right?
> 
> Thanks a lot
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list