jeraldfdo
jeraldfdo

Reputation: 1517

Create a SQLite db under a specific folder in a Java application

I need to create this db under a specific folder known as dbs. I tried "\" & ".". Both didnt work as expected

c = DriverManager.getConnection("jdbc:sqlite:dbs\test.db");

Thanks in advance

Upvotes: 0

Views: 971

Answers (1)

user1521640
user1521640

Reputation: 151

you have to escape your backslash

c = DriverManager.getConnection("jdbc:sqlite:dbs\\test.db");

Also you have to have the folder dbs already created in your directory.

Upvotes: 1

Related Questions