• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Database connection

 
Ranch Hand
Posts: 95
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 95
1
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved my problem classpath was wrong.

 
Sheriff
Posts: 7111
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for posting your solution.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry, where do i change the "classpath" ive looked online for about 2 hours, if someone could post a step by spte on whre classpath is that would be a massive help as i have the exact same issue and im using the same tutorial
 
Marshal
Posts: 26597
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sean Magennis wrote:im using the same tutorial



See Step 9 of the tutorial.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic