public class TestDB extends SQLiteOpenHelper { private static final String DATABASE_NAME = "usertest.db"; private static final int DATABASE_VERSION = 1; public TestDB (Context context){ super(context, context.getExternalFilesDir(null).getAbsolut
看了很多别人写的安卓SQlite数据的操作代码,一点也不通俗易懂,我觉得我写的不错,而且安卓项目也用上了,所以在博客园里保存分享一下!建立一个类 并继承SQLiteOpenHelper public class MySqliteHelper extends SQLiteOpenHelper { public MySqliteHelper(Context context) { super(context, "userdb.db", null, 3); // TODO Auto-gener
xamarin使用SQLite时对应的访问路径各个平台不一样,需要单独引用.在使用前添加SQLite引用包,在解决方案上右击选择解决方案的Nuget管理选项,在浏览中输入sqlite-net-pcl,选择sqlite-net-pcl这个安装好就可以了,请认准安装包,不要装错了,有很多类似的包,但是不是同一个人写的. 下面各平台罗列代码: Windows8.1: public SQLiteConnection GetConnection(string dbName) { var sqliteFil