Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

No suitable driver error  RSS feed

 
Chak Terlapu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!