• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to connect to mysql database?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
reply
    Bookmark Topic Watch Topic
  • New Topic