i placed every thing in proper place(i.e in lib folder ) and placed in class path also...
but still i am facing problem is that when i run my application i am unable to get any response......t hat is in browser i didnt notice anything.....
my code is:
i have database called ravi and one table named kumar.
<%
try
{
Class.forName(" com.microsoft.s qlserver.jdbc.S QLServerDriver" );
String url="jdbc:micro soft:sqlserver://localhost:1433, ravi";
Connection con=DriverManag er.getConnectio n
("url","sa","sa ");
out.println("co nnected");
Statement st=con.createSt atement();
ResultSet re=sql.executeQ uery("select * from stuinfo");
String sql ="INSERT INTO kumar VALUES('Michael ','dba','9000') ";
con.close();
}
catch (Exception e)
{
e.printStackTra ce();
}
}
i m not getting the stmt written in out.println();
i think the problem is occuring at connection statement.....
the jar files i mentioned in lib folder are sqljdbc.jar,odb d14.jar,jtdc-1.2.jarmsutil.j ar,msbase.jar,m ssqlserver.jar, classes111.jar
i put these in class path also....
tell me where am i doing wrong?
is any intermediate cinnector is required like in the case of my sql?
thanks in advance
ragards
ravi......
but still i am facing problem is that when i run my application i am unable to get any response......t hat is in browser i didnt notice anything.....
my code is:
i have database called ravi and one table named kumar.
<%
try
{
Class.forName(" com.microsoft.s qlserver.jdbc.S QLServerDriver" );
String url="jdbc:micro soft:sqlserver://localhost:1433, ravi";
Connection con=DriverManag er.getConnectio n
("url","sa","sa ");
out.println("co nnected");
Statement st=con.createSt atement();
ResultSet re=sql.executeQ uery("select * from stuinfo");
String sql ="INSERT INTO kumar VALUES('Michael ','dba','9000') ";
con.close();
}
catch (Exception e)
{
e.printStackTra ce();
}
}
i m not getting the stmt written in out.println();
i think the problem is occuring at connection statement.....
the jar files i mentioned in lib folder are sqljdbc.jar,odb d14.jar,jtdc-1.2.jarmsutil.j ar,msbase.jar,m ssqlserver.jar, classes111.jar
i put these in class path also....
tell me where am i doing wrong?
is any intermediate cinnector is required like in the case of my sql?
thanks in advance
ragards
ravi......
Comment