Skip to content Skip to sidebar Skip to footer

Sqlite S3db File To Connect With Android Application

What is the code that needs to be written to attach or connect a SQLite s3db file to connect with android application? Where must the code be placed?

Solution 1:

In your main activity setup your DB.

 private void setupDatabase() 
         {
                Dbhelper myDbHelper = new Dbhelper(getApplicationContext());
                myDbHelper = new Dbhelper(this);

                try {

                    myDbHelper.createDataBase();

                } catch (IOException ioe) {

                    throw new Error("Unable to create database");

                }

            }

Post a Comment for "Sqlite S3db File To Connect With Android Application"