Thx for the answers !
SO I have two (maybe 3) solutions :
- use the Android sqlite classes : so it won't be crosscompilabe, but maybe
it's just a little drawback if I manage to isolate the platform UI specific
code...
But for that , I need to actually manage to use Android's sqlite
framework... but I'm stick on SQLiteOpenHelper : I have to subclass it but I
can't see how to call the base (super in java?) call constructor like here :
public class NoteDatabaseHelper : SQLiteOpenHelper
{
private const string DATABASE_NAME = "Notes";
private const int DATABASE_VERSION = 1;
public NoteDatabaseHelper(Context context)
: base(context, DATABASE_NAME, null, DATABASE_VERSION)
{
}
public override void OnCreate(SQLiteDatabase db)
{
db.ExecSQL(@"
CREATE TABLE Note (
Id INTEGER PRIMARY KEY AUTOINCREMENT,
Title TEXT NOT NULL,
Contents TEXT NOT NULL
)");
}
public override void OnUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion)
{
db.ExecSQL("DROP TABLE IF EXISTS Note");
OnCreate(db);
}
}
- the second method would like to be using ArrayAdapter, but then I have to
extracting data from the sqlite database to pack them into arrays, don't
seem really pretty !
- maybe the third option would be to create a class, implementing ICursor,
and taking an SqliteDataReader... but it seems harder and I'd like to know
I'm heading strait to the wall :)
Am I missleading ?
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Mono-Data-Sqlite-and-cursors-tp4913036p4913390.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid