Forums Register Login

problem connecting to sql database using jtds driver

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
sorry, bt it's not getting very clear to me? can you please explain?
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1405 times.
Similar Threads
Connecting to MSSQL2000
Database Access problem
java.sql.SQLException: No suitable driver found
Is my javaBean a javaBean?
Connection pooling with SQL Server
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:55:59.