Creating Database in JDBC Sqlite

后端 未结 1 813
忘了有多久
忘了有多久 2020-12-10 14:24

I am using the SQLite driver from http://code.google.com/p/sqlite-jdbc/wiki/Introduction Examples shown in the above doc shows how to connect an existing database.

I

相关标签:
1条回答
  • 2020-12-10 14:39

    SQLite creates new database file on first attempt to connect if file did not exist already.

    So, simply use jdbc:sqlite:filename.db as JDBC connection string, and provided that you have permission to create filename.db, it will be created automatically. You can also manually pre-create this file with 0 size if you want.

    0 讨论(0)
提交回复
热议问题