Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connection Class

 
V R Aravind
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was trying to create a connection class so that i can create new connections as instances of this class and to avoid 'Connection' from being public. i'm using eclipse IDE. and it shows some error in the following block of code. The error is in the instruction "Class.forName"


Also the code was working fine when i was creating the connection inside the main method..
Please help..
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

and it shows some error in the following block of code

I'm pretty sure I can guess what the error is, but it might be quicker if you told us.
 
V R Aravind
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry, the error is "Syntax error on token "forName", = expected after this token".
 
V R Aravind
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ugh at last i think i got a solution.. and i got it from this forum itself..


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic