1

I've recently been fiddling around with databases and finally. So, naturally, I turned to SQuirrel to open and view my work, but it seems I can't get the formatting for the alias right. Currently what I have been trying is:

jdbc:derby:C:\path_to_my\database

Is this the correct format for org.apache.derby.jdbc.EmbeddedDriver? I can't find anything particularly useful online, unfortunately.
Thanks,
Michael

Nakilon
  • 34,866
  • 14
  • 107
  • 142
  • Fyi, this is the error that I get: --------------------------------------------------------------------------------------------------------- PDFManager: Database 'C:\Users\myusername\Desktop\Computer Science\Java projects\PDFManager' not found. class org.apache.derby.impl.jdbc.EmbedSQLException: Database 'C:\Users\myusername\Desktop\Computer Science\Java projects\PDFManager' not found. – MilitantMissourian1776 Sep 05 '20 at 20:03
  • You're passing the project directory. You're supposed to pass the [database name](https://db.apache.org/derby/papers/DerbyTut/embedded_intro.html). Did you not find the Derby documentation, or was it not "particularly useful"? – Kayaman Sep 05 '20 at 20:25
  • What am I supposed to do? Give the file path to the database? Or do I simply put jdbc:derby:name-of-the-database? The derby documentation didn't really answer my question, haha. – MilitantMissourian1776 Sep 05 '20 at 20:42
  • The name of the database. Exactly like the documentation shows. If you run the example code, it works. Therefore it has a working connection string. That connection string has the name of the database. Do you have an existing database? If so, then you already know the name, as you've already connected to it with a connection string somewhere. If not, then you get to create a database and choose the name. – Kayaman Sep 05 '20 at 20:53
  • Well, when I simply put jdbc:derby:PDFManager, it doesn't find anything. It only works if I copy the database inside the SQuirrel Folder. I'm on a school computer, so everything is kinda messed up, so I think that's probably why stuff is acting up. Thank you for your concern though, Michael. – MilitantMissourian1776 Sep 05 '20 at 21:09
  • 1
    Possibly the embedded space in `Computer Science` is causing a problem? – Bryan Pendleton Sep 05 '20 at 21:34

0 Answers0