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>>
}
asked Jul 20, 2013 at 21:01

1 Answer 1

1

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

answered Jul 21, 2013 at 17:51
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.