Example: mydatabase.execSQL(“CREATE TABLE TutorialRide(Admin_name VARCHAR, Password VARCHAR) ”) mydatabase.execSQL(“INSERT INTO TutorialRide VALUES('ABC', '123') ”) Īn object of the Cursor class is used to fetch the data from the database. Syntax: execSQL(String SQL, Object bind Args) The execSQL() method is used not only to insert a data, but also to update or modify the existing data in database, using bind arguments. This method is defined in SQLiteDatabse class. The execSQL() method is used to insert the data into table. Syntax SQLiteDatabse mydatabase = openOrCreateDatabase (“database_name”, MODE_PRIVATE, null) ![]() This method returns an instance of SQLite database. The openOrCreateDatabase() method is called for creating a database with your database name and mode as a parameter. The is the main package in Android SQLite which contains the classes to manage your own databases. To use the SQLite database, the SQLiteOpenHelper class is used which provides various functionality. ![]() It stores data to a text file on a device and supports all the relational database features. ![]() ![]()
0 Comments
Leave a Reply. |