开发者

How to create SQLite DB throw android code?

开发者 https://www.devze.com 2023-03-16 15:49 出处:网络
In my android application i want to create a SQLite database to store some values.I want to create the the database with auto increment field throw android code.

In my android application i want to create a SQLite database to store some values.I want to create the the database with auto increment field throw android code.

Pl开发者_Go百科ease any one help me to do that with some sample code

Thanks in advance


To create SQLiteDatabase 1.Create a class that implements android.database.sqlite.SQLiteOpenHelper class 2.Create an object of the above implemented class 3.Call one of the methods getReadableDatabase() or getWritableDatabase() as per your requirement. 4.The above methods returns android.database.sqlite.SQLiteDatabase object,which contains the methods to manage the database

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号