Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 SQLite4Java 创建新数据库?例如,在尝试打开与尚不存在的数据库的连接之后。
SQLiteConnection db = new SQLiteConnection(new File("DB.db")); try { db.open(true); } catch (SQLiteException e) { <<CREATE DB>> }
如果将 true 传递给 open() 方法,则如果数据库不存在,则将创建该数据库。