When I use SQL I have the app create the DB in the correct folder and
populate it on the first run using something like this:
string _dbname;
public SystemDataHelper (string dbname)
{
_dbname = dbname;
}
public SqliteConnection GetConnection()
{
var documents =
Environment.GetFolderPath(Environment.SpecialFolder.Personal);
string db = Path.Combine(documents, _dbname);
bool exists = File.Exists(db);
if (!exists) SqliteConnection.CreateFile(db);
var conn = new SqliteConnection("Data Source="+db);
If (!exists)
{
Š. Create DB etcŠ.
Hope that helps...
Cheers
Dean
On 31/08/11 9:32 PM, "catullum" <[email protected]> wrote:
>Ok thanks but please tell me how can i say to the monodevelop that the
>sqlite
>files gos to the documents folder durin the compilation?
>
>In all the tutorials that i have read they toks abOut this folder but
>never
>say how can i get the file in this folder. The most folder toks aubut how
>i
>can create a db in this folder but my db is just created and has just some
>information by default like the useres and the their passwords.
>
>best regards
>Fabrizio Pascotto
>
>
>--
>View this message in context:
>http://monotouch.2284126.n4.nabble.com/sqlite-insert-works-on-the-simulato
>r-but-not-on-the-device-tp3780598p3780726.html
>Sent from the MonoTouch mailing list archive at Nabble.com.
>_______________________________________________
>MonoTouch mailing list
>[email protected]
>http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch