File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to connect to mysql database?

 
Kavitha Sen
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I have eclipse ide,tomcat server and mysql database, oracle ide.
I have included ojdbc14.jar in classpath.

Now i like to know how to connect database in eclipse. I mean what code should be included? and where to include? can any one help me.

sorry for asking the basic doubt.
 
Kavitha Sen
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello again,

I copied the following code for database connection.


But i get this error.

Darn! A SQL error: Io exception: The Network Adapter could not establish the connection

What should I do? please help me. Thanks.
 
aswin kumar
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi !
configure a jdbc Driver in eclipse, for this windows->showView->DBBrowser->rtClick->someConfiurations like drivername and Login Details and add jar files for Driver

and then make sure Database is in running mode,after that you can execute your program.

regards,
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic