hi rathi ji,
Thanks for replying I have created the dsn name in the following way
I have selected DataSources from control panel then
I have selected add then I have selected the driver as Sql Server,clicked finish
then i have given data source name as link
then i have selected the my system server and the database name from which i have implemented, then i have given the authentication from sql
then i said ok
then i have tested the data source which gave me Data Source
test successfull
which I have implemented in my servlet class as following
Yes, no jar is required in case of type 1 driver.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class OnlineEx1 extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse res)throws IOException,ServletException
{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
int id=Integer.parseInt(req.getParameter("id"));
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc
dbc:NIKE","sa","");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from myemp where eid= "+id);
}
catch (Exception e)
{
out.println(e);
}
..............................
...........................
Thankyou,
Regards
Manoj Ravikanti
How did you create the DSN? Can you post the whole step?
--------------------