Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

"no suitable driver" problem while connecting to Access  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whenever i try to connect to the access database from the applet, i get the sql exception - "no suitable driver".
given below is the code snippet from my program which i use to connect to the database :

try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

}
catch(ClassNotFoundException e)
{
System.err.print("\n ClassNotFoundException: ");
System.err.println(e.getMessage());
}

try
{
con = DriverManager.getConnection("jdbc dbc:candidate","","");
System.out.println("\n Connected to Database...");
}
catch(Exception e)
{
System.err.println("\n ERROR : " + e);
}

please help me as this problem has been bugging me from a long time and making me frustrated
thanx for any help in advance :p
[ May 03, 2002: Message edited by: yali ]
 
Ranch Hand
Posts: 8934
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of JDK r u using?

Originally posted by yali:
whenever i try to connect to the access database from the applet, i get the sql exception - "no suitable driver".
given below is the code snippet from my program which i use to connect to the database :

try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

}
catch(ClassNotFoundException e)
{
System.err.print("\n ClassNotFoundException: ");
System.err.println(e.getMessage());
}

try
{
con = DriverManager.getConnection("jdbc dbc:candidate","","");
System.out.println("\n Connected to Database...");
}
catch(Exception e)
{
System.err.println("\n ERROR : " + e);
}

please help me as this problem has been bugging me from a long time and making me frustrated
thanx for any help in advance
[ May 03, 2002: Message edited by: yali ]

 
yali
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm using JDK 1.3
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"yali",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please re-register and select a new name which meets the requirements.
Thanks.
Dave
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!