• 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 databas using odbc in servlet

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i m creating simple page and codding of my class is bellow . tell me how i can connect database at running time .i m using ms access as when



i start server and enter user name and password .there is processing but it does not make any respond . tell me what is the problem help me [email removed]
[ September 26, 2008: Message edited by: Bear Bibeault ]
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Please go back and edit your post (pencil-and-paper icon) so as to disable smilies and get rid of the excess spaces round the : and o which appear as .
Please don't ask people to e-mail you.

What are you supposed to pass to the JDBC connection? Is it really "Jdbc: odbc:user" not the user's name? How are you passing a user name and password to the database?
You appear to be calling rs.next() frequently; you call if (rs.next()) which will go to the first row of the ResultSet, then while (rs.next()) which will start from the 2nd row. I think the if is unnecessary, and might cause you to miss the 1st row.


See whether my suggestions are any help; if not, please ask again.
[ September 26, 2008: Message edited by: Campbell Ritchie ]
reply
    Bookmark Topic Watch Topic
  • New Topic