Two Laptop Bag
The moose likes JDBC and Relational Databases 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


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: newbaby in JDBC problems for run a program..