This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JDBC and the fly likes re: learning JDBC programming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "re: learning JDBC programming" Watch "re: learning JDBC programming" New topic
Author

re: learning JDBC programming

sid alam
Greenhorn

Joined: Dec 01, 2001
Posts: 27
I am learning JDBC.
When I run a tutorial program I get an error of type:
SQLException: No suitable driver.
What do I need to do to make the code work?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Have you seen this page yet?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Also, Sid, without actually seeing the code it is hard for us to tell you what is wrong with it...


Dave
Srinivas
Greenhorn

Joined: Feb 01, 2002
Posts: 9
the error should be with the class.forname line of the code. it happens when the JDBC driver needed to connected to the database is missing
hth


Srinivas
sid alam
Greenhorn

Joined: Dec 01, 2001
Posts: 27
I have managed to solve my initial problem on the tutrial I was working on. This was with a db connection to MS Access.
I have decided to try the tutorial written by Marilyn deQueiroz. I have downloaded mysql but when I run mysql I get an error of type:
D:\mysql\bin>mysql.exe
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
To activate it, run the program "\mysql\bin\mysqld-nt --standalone"
if you are running Windows NT or Windows 2000.
If you are running Win9x use "D:\mysql\bin>mysqld --standalone"

When I use "\mysql\bin\mysql.exe", I get the same error you describe.

Actually the page you are looking at was originally written by Paul Wheaton.
[ February 05, 2002: Message edited by: Marilyn deQueiroz ]
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
MySQL is much beter than Access...
That being said if you really dont like the command line then ther are a few GUIs available for it on the MySQL site. IF you still dont like it and want to go back to Access then what you might have forgotten is to set up a DSN on your computer for the ODBC. And then make sure you're using the JDBC-ODBC bridge.
Any more questions let us know...
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

(if only there was a forum dedicated to this )
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
A forum for JDBC?!? Hey, I think here is one, so I'll move this there - actually I was going to do that at first but then for some reason I started thinking it was a beginner question, but JDBC isn't a beginner topic so here it goes...
 
GeeCON Prague 2014
 
subject: re: learning JDBC programming