Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
|
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 12th, 2005, 05:08 PM
Registered User
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default MySQL and JDBC - some basic problems

Hey, I'm kind of new to this but, I have, I think, a simple question:

I have a MySQL database. I want a Java App to connect to it, write to it, etc...

I have my code written all right except I get an error in connecting. I have a MySQL database and a standard Odbc driver but I think I have the data within the forName() method wrong.

I've been looking for where to find the Driver name (like Jdbc:Odbc:myDriver for example) but I don't know where to get that, if anyone could help point me in the right direction that would be really awesome.

Tks!
 
Old October 12th, 2005, 08:14 PM
Registered User
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is Baes again, I had someone help me figure it out -
I had the Jar file in the wrong location (the JDBC connector), I just kind of guessed the correct name for the Driver.
So for progencies sake (if any are as thick skulled as me)
you can either change the enviroment variables or just move the Jar file into your jre/lib file.

Anyway, there you go.

 
Old January 2nd, 2006, 02:36 PM
Registered User
 
Join Date: Jan 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well,java APP connects databases needs JDBC,take Mysql for example,"Class.forName("org.gjt.mm.mysql.Driver"); "






Similar Threads
Thread Thread Starter Forum Replies Last Post
jdbc-mysql kvenk111 Java Databases 1 April 13th, 2006 02:20 AM
mysql + JDBC + Linux silver_cuts Java Databases 2 March 23rd, 2006 09:28 AM
mysql+JDBC over LAN bamboat_3 Java Databases 1 April 1st, 2005 04:14 AM
Cannot load JDBC driver class with com.mysql.jdbc. dzis Apache Tomcat 0 January 29th, 2004 11:57 AM
Cannot load JDBC driver class with com.mysql.jdbc. dzis MySQL 0 January 29th, 2004 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.