Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Database connection

 
Ranch Hand
Posts: 76
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried getting a SQLite database connected and am having problems.

Here is my code:



When i run the code I get this error: No suitable driver found for jdbc:sqlite:/Users/rogerwells/Desktop/sqlite/TestDB.rmgc

I can use a db browser and look at the TestDB file it is OK.

So it must be classpath or the way I have loaded the driver or the URL? But I can't make it work.

Here is a link to the tutorial I am using. http://www.sqlitetutorial.net/sqlite-java/sqlite-jdbc-driver/



Screen-Shot-2019-06-22-at-7.55.49-AM.png
[Thumbnail for Screen-Shot-2019-06-22-at-7.55.49-AM.png]
Project list
 
Roger Wells
Ranch Hand
Posts: 76
1
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved my problem classpath was wrong.

 
Sheriff
Posts: 6268
167
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for posting your solution.
 
It's exactly the same and completely different as this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!