Solved

JDBC Connection ERROR

Posted on 2001-07-10
3
359 Views
Last Modified: 2008-03-06
Hi friends...

  My Database is SQLBase.

  I have downloaded the JDBC Type 4 driver from centura site.
I run it and installed in c:\com\centurasoft\java\sqlbase
directory.

My class path is
Set classpath = .;c:\jdk1.2.2\lib\dt.rar;c:\com\centurasoft\java\sqlbase

In my program as follows..

Class.forName("centura.java.sqlbase.SqlbaseDriver");

but its showing an exception saying that..No suitable driver found.
when i change the class path, it shows another exception  that "wrong name(com\centurasoft\java\sqlbase\SqlbaseDriver)"

I'm not able to load the Sqlbase driver..
I'm using JDK1.2.2 nd win98,..database in NT
please help me

thanks
Jim
0
Comment
Question by:jimaricat072100
3 Comments
 

Expert Comment

by:anhphuongnn
ID: 6271983
Hi Jim,

You find driver file *.zip or *.jar
And then you add filename.zip in end of path.

Set classpath = .;c:\jdk1.2.2\lib\dt.rar;c:\com\centurasoft\java\sqlbase\filename.zip


Best Regards
Phuongnguyen
0
 
LVL 1

Expert Comment

by:ruifilipevale
ID: 6273276
Hello!
You can make a jar from the driver classes, only and only if you have them extracted to the dir c:\com\centura\........

In a dos shell:

cd c:\com
c:\jdk1.2.2\bin\jar cvf YourDriver.jar centura

Then copy the resulting YourDriver.jar to c:\jdk1.2.2\jre\lib\ext\

This sould solve your problems.

Run your program using the full path to java. (probably c:\jdk1.2.2\bin\java)

Hope it helps!


          RFV
0
 
LVL 1

Accepted Solution

by:
jimsims earned 100 total points
ID: 6273771
your classpath and the driver path given don't match:

Class.forName("centura.java.sqlbase.SqlbaseDriver");

Set classpath = .;c:\jdk1.2.2\lib\dt.jar;c:\com\centurasoft\java\sqlbase

likely you just need to change your classpath to:

Set classpath = .;c:\jdk1.2.2\lib\dt.jar;c:\

and set the driver to:

Class.forName("com.centurasoft.java.sqlbase.SqlbaseDriver")

e.g. - either both should say centurasoft or centura
and almost certainly both should start with com.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now