• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

re: learning JDBC programming

 
sid alam
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you seen this page yet?
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, Sid, without actually seeing the code it is hard for us to tell you what is wrong with it...
 
Srinivas
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
sid alam
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(if only there was a forum dedicated to this )
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic