wood burning stoves 2.0*
The moose likes JDBC and the fly likes how to connect databas using odbc in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to connect databas using odbc in servlet " Watch "how to connect databas using odbc in servlet " New topic
Author

how to connect databas using odbc in servlet

bhavishya goyal
Greenhorn

Joined: Sep 26, 2008
Posts: 1
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 ]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38057
    
  22
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 ]
 
Consider Paul's rocket mass heater.
 
subject: how to connect databas using odbc in servlet
 
Similar Threads
Unable to find specific product
Problems when viewing specific description when search
To show the Error message at the login.jsp page using servlet
Access database from a class file
user authentication servlet problem