This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC Connection Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Connection Class" Watch "JDBC Connection Class" New topic
Author

JDBC Connection Class

V R Aravind
Greenhorn

Joined: Jan 21, 2009
Posts: 9
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

Joined: Apr 14, 2004
Posts: 10336


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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
V R Aravind
Greenhorn

Joined: Jan 21, 2009
Posts: 9
sorry, the error is "Syntax error on token "forName", = expected after this token".
V R Aravind
Greenhorn

Joined: Jan 21, 2009
Posts: 9
ugh at last i think i got a solution.. and i got it from this forum itself..


 
jQuery in Action, 2nd edition
 
subject: JDBC Connection Class