• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

re: learning JDBC programming

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you seen this page yet?
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
reply
    Bookmark Topic Watch Topic
  • New Topic