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 August 19th, 2004, 08:36 AM
Registered User
 
Join Date: Aug 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default about jsp database connection

1. I have a mysql database on my pc.
what should I use in this statement?

ClassForname("");

2. I use the same method to connect to a Oracle server in my company

ClassForname("oracle.jdbc.driver.OracleDriver");

the server is Oracle 7.3

but it said can not found suitable driver(sql exception)

who can help? thanks very much. Gui xie! :)

 
Old August 19th, 2004, 11:16 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

You have to set the classpath to the Oracle Installed folder
               [C:/D:]\oracle\ora73\jdbc\lib

Where the jar files like classes*.jar

You can find more details at
http://java.sun.com/developer/online...jdbc/jdbc.html

http://java.sun.com/docs/books/tutorial/jdbc/index.html


 
Old August 19th, 2004, 11:24 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Dirvers can also be searched & downloaded from the following link

http://servlet.java.sun.com/products/jdbc/drivers

 
Old September 24th, 2004, 01:11 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Depends on the driver you have installed, I use:

"org.gjt.mm.mysql.Driver";

Think this is an older driver, but works fine.


 
Old December 20th, 2004, 08:26 AM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please check for the proper zipp or jar file for the driver is set in the classpath environment variable.

More:

http://www.ideas2work.com

Thanks
Quote:
quote:Originally posted by qiezi
 1. I have a mysql database on my pc.
what should I use in this statement?

ClassForname("");

2. I use the same method to connect to a Oracle server in my company

ClassForname("oracle.jdbc.driver.OracleDriver");

the server is Oracle 7.3

but it said can not found suitable driver(sql exception)

who can help? thanks very much. Gui xie! :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Runtime DB connection from JSP ssivakumar76 BOOK: Beginning Java 2, JDK 5 Edition 0 June 16th, 2006 03:07 AM
error accessing database connection using jsp muthumari_p2003@yahoo.com Pro JSP 0 May 8th, 2006 05:54 AM
problem with JSP-MySQL connection pandjie Java Databases 2 November 18th, 2004 04:44 PM
cannot make JSP-MySQL connection pandjie JSP Basics 1 November 12th, 2004 01:21 PM





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