Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DriverManager.getConnection(..) and "CREATE DB" - differences?

user13329458Apr 13 2009 — edited Apr 14 2009
	private void initDBConnection() throws ClassNotFoundException, SQLException {
                        // STEP 1: LOADING THE DRIVER MANAGER
		Class.forName("org.sqlite.JDBC");
		String url = "jdbc:sqlite:D:\\TEMP\\test.db";
                        // STEP 2: CONNECTING TO THE DATABASE SERVER
		Connection connection = DriverManager.getConnection(url, "", "");
	}
OK, it's work, but in step2 my code connect AND create db (test.db) if not exist.
But what about SQL query: "CREATE DB test.db". What's differences?
When I need to execute query "CREATE DB test.db" ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 12 2009
Added on Apr 13 2009
2 comments
187 views