• 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

JDBC BEAN AND SOURCE

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to use a Javabean to connect to a mysql database.
im using the folowing bean':

now i want to implement this code into a jsp
but what am i doing wrong?

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm... since you didn't post any error messages, I'll just point out a few things I see wrong.
1. Your mysql code appears to be missing the class declaration statement, e.g. "public class mysql {". Maybe that's just a typo in your post?
2. Your "mysql" class does not define a method called connect(). It does have one called connected().
3. Statement.executeUpdate() returns an int, not a ResultSet.
Other than that, I suggest you post the exceptions you're getting so we can narrow it down more. Good luck.
 
Ivo Delver
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is working know
Tnx alot
 
reply
    Bookmark Topic Watch Topic
  • New Topic