Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem connecting to sql database using jtds driver

 
Rituparna Duttagupta
Ranch Hand
Posts: 55
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends, this is me again.
i was developing a e-tutorial site, and tried to handle the database through the jtds driver for sql.
i've created a regn page, which passes on the values of the form to a servlet which calls a sessionbean, which handles the database.
to connect to database(YGExam) of the sql server(ERT-PC) having username(sa) and password(123), i've written the following code-
Class.forName("net.sourceforge.jtds.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:jtds:sqlserver://ERT-PC:1433/YGExam; instance=SQLEXPRESS","sa","123");
then used PreparedStatement toinsert the values to the db table.
on completion of which the servlet must passes the control by getRequestDispatcher() method to another jsp page.
bt nothing's showing, no error, no jsp page nothing.not even the data gets inserted intothe db table.
can someone please help? is it that it's a connection problem?bt then why it's not showing any error?
 
Paul Clapham
Sheriff
Pie
Posts: 20955
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, in other words, you don't know that this is a "problem connecting to sql database using jtds driver" at all. For all you know there could be a bug in your servlet code because of which your JDBC code isn't even called. Or perhaps your servlet wasn't even requested. I suggest you do some debugging until you can tell what is happening and what is not happening.
 
Rituparna Duttagupta
Ranch Hand
Posts: 55
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry, bt it's not getting very clear to me? can you please explain?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic