0

How can I create a new DB with SQLite4Java? For example after trying to open connection to a DB that does not exist yet.

SQLiteConnection db = new SQLiteConnection(new File("DB.db"));
try {
    db.open(true);
} catch (SQLiteException e) {
    <<CREATE DB>>
}

1 Answer 1

1

If you pass true to the open() method, the database will be created if it doesn't exist.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.