Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic