Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC Connectivity in Servlets  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I tried to connect to access database with servlets...using jdbc.. I am getting a "General Error" exception for the statement


where con is connection object....the msdsn is the system dsn name which refers to the StudentDatabase.mdb database..

please help me in this regard

[ August 11, 2008: Message edited by: Raghavender Ammagari ]
[ August 11, 2008: Message edited by: Raghavender Ammagari ]
 
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check this out MS JDBC
 
Ranch Hand
Posts: 1084
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you load the driver?



Thanks,
Shailesh
 
Sheriff
Posts: 23510
47
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Shailesh posted is NOT the correct class name for the JDBC-ODBC driver. It looks like it might have been the correct class name for some Microsoft driver a long time ago.

Anyway, try not putting a space in the middle of your URL where it doesn't belong.
 
Shailesh Chandra
Ranch Hand
Posts: 1084
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Paul Clapham:
What Shailesh posted is NOT the correct class name for the JDBC-ODBC driver.




right, I just wanted to remind poster to load the class, so copied an old code from my repositoy. Thanks for reminding
 
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!