0

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

1
  • What did you expect? What was the actual result? Commented Oct 21, 2014 at 12:37

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

AFAIK backslashes (\) would only work with windows... Instead of using (\\), try a simple slash /: c = DriverManager.getConnection("jdbc:sqlite:dbs/test.db");

Your Answer

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.