• 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
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Database connection

 
Ranch Hand
Posts: 75
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: 75
1
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved my problem classpath was wrong.

 
Sheriff
Posts: 6029
157
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 is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!