Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > jdbc
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 5th April 17:45
john gregory
External User
 
Posts: 1
Default jdbc



I'm having problems setting up mysql to do some
jdbc. Here's what I've done so far:

a) downloaded mysql and set it up. I can do manual
sql entries, create table, insert into table, all
through a dos window.
path to mysql--> c:\program files\mysql

b) downloaded mysql-connector-j and set my classpath
variable through the control p****, system option.
path to mysql--> c:\program files\mysql connector
which is the directory containing the
mysql-connector-java-3.1.13-bin.jar file

c) typed a java file in which I just start with
Class.forName("EXACTLY WHAT GOES IN HERE?").newInstance();
I had what was in the connector-j do***entation, which was
"com.mysql.jdbc.Driver", but all I've ever gotten was an
exception thrown

Can anybody help me? Am I missing something? I've followed ALL
the install instructions, but for some reason my program doesn't
recognize the driver.
Thanks,

John
  Reply With Quote


  sponsored links


2 5th April 17:45
donkey hot
External User
 
Posts: 1
Default jdbc



You have to add the jar file itself to the classpath, not the directory
containing it.

--
TeX is potentially the most significant invention in typesetting in this
century. It introduces a standard language for computer typography, and in
terms of importance could rank near the introduction of the Gutenberg
press.
-- Gordon Bell
  Reply With Quote
3 5th April 17:45
john gregory
External User
 
Posts: 1
Default jdbc


I double checked the classpath and the
mysql-connector-java-3.1.13-bin.jar is in
there, not just the MySQL Connector directory. I had to do a similar
thing when
I set up Jakarta-Tomcat, include the servlet-api.jar and jsp-api.jar in
the classpath.

John
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666