Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

newbaby in JDBC problems for run a program..

 
Miguel Enriquez
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see: http://rafb.net/paste/results/Nvo88441.html
any advice?
much thanks
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you ask for a Drivr, you pass in a database URL, and the DriverManager asks each Driver that it knows of whether it will accept the database URL. It look slike you're loading the DRiver correctly (this is the most common error), but the database URL and Driver are no matching up correctly.
I thinl you might have a trailing slash that should not be there... Try this:
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/listas", props);
(note there is no slash after the string 'listas')
Dave
 
fox tie
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
another problem is in your for loop code : col<colCount should be "col <= colCount".
 
Miguel Enriquez
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!