GeeCON Prague 2014*
The moose likes JDBC and the fly likes newbaby in JDBC problems for run a program.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "newbaby in JDBC problems for run a program.." Watch "newbaby in JDBC problems for run a program.." New topic
Author

newbaby in JDBC problems for run a program..

Miguel Enriquez
Ranch Hand

Joined: Mar 13, 2004
Posts: 94
see: http://rafb.net/paste/results/Nvo88441.html
any advice?
much thanks
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

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

Joined: Mar 29, 2004
Posts: 7
another problem is in your for loop code : col<colCount should be "col <= colCount".
Miguel Enriquez
Ranch Hand

Joined: Mar 13, 2004
Posts: 94
thanks
 
GeeCON Prague 2014
 
subject: newbaby in JDBC problems for run a program..