File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT / JFace and the fly likes No suitable driver error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "No suitable driver error" Watch "No suitable driver error" New topic
Author

No suitable driver error

Chak Terlapu
Ranch Hand

Joined: Oct 20, 2000
Posts: 32
Hi,
I am trying to connect to a database and display the results in an applet using JTable. I am using a TableModel in which I have the following statements:

When I try to view the applet from the browser, I get an error in Java console saying "Cannot connect to this database: No suitable Driver". I tried a simple java program that connects to a databse and displays the results at stdout and I was successful. I am unable to figure out what might be the problem. Could anyone
please help me out?
Thanks in advance
Chak
Durga Penmatsa
Greenhorn

Joined: Aug 14, 2001
Posts: 23
Hi,
No suitable driver found, => that the driver classes are not there in the classpath, check for classpath properly.
Moreover the database must reside on the same machine from where the applet originated.
Cheers
Durga
Originally posted by Chak Terlapu:
[B]Hi,
I am trying to connect to a database and display the results in an applet using JTable. I am using a TableModel in which I have the following statements:

When I try to view the applet from the browser, I get an error in Java console saying "Cannot connect to this database: No suitable Driver". I tried a simple java program that connects to a databse and displays the results at stdout and I was successful. I am unable to figure out what might be the problem. Could anyone
please help me out?
Thanks in advance
Chak [/B]

Chak Terlapu
Ranch Hand

Joined: Oct 20, 2000
Posts: 32
Hi,
I think the problem is that the database resides on a different machine from where the applet originates. Is there a fix to this problem. Can we make it work if the database is on a different machine. Is it because of applet "security issues" that we might not be able to do this. Could you answer these questions please
Thanks
Chak
 
IntelliJ Java IDE
 
subject: No suitable driver error
 
Threads others viewed
JTable
JDBC
TableModel-unable to locate error
JTable
JTable
MyEclipse, The Clear Choice