hello sir...
i m using sql server 2000 database and usig jsp to access it
when accessig i am getting followig error
java.sql.SQLExc eption: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.
i installed Microsoft SQL Server 2000 Driver for JDBC in my system.
do i need to do ay thing extra other tha thse thing?
this is my code:
<%@ page import = "java.io.*" import = "java.lang. *"
import = "java.sql.* " %>
<%
out.println("<h 2>Successfully logged in11111111</h2>");
try
{
Class.forName(" com.microsoft.j dbc.SQLServerDr iver");
Connection con=DriverManag er.getConnectio n( "jdbc:host://localhost:8080/ravi","sa","sa" );
Statement st = con.createState ment();
String sql="INSERT INTO ravi1 VALUES ('Michael', 'dba', '90000' )";
st.executeUpdat e(sql);
}
waiting for u r rply
thanks in advace
i m using sql server 2000 database and usig jsp to access it
when accessig i am getting followig error
java.sql.SQLExc eption: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.
i installed Microsoft SQL Server 2000 Driver for JDBC in my system.
do i need to do ay thing extra other tha thse thing?
this is my code:
<%@ page import = "java.io.*" import = "java.lang. *"
import = "java.sql.* " %>
<%
out.println("<h 2>Successfully logged in11111111</h2>");
try
{
Class.forName(" com.microsoft.j dbc.SQLServerDr iver");
Connection con=DriverManag er.getConnectio n( "jdbc:host://localhost:8080/ravi","sa","sa" );
Statement st = con.createState ment();
String sql="INSERT INTO ravi1 VALUES ('Michael', 'dba', '90000' )";
st.executeUpdat e(sql);
}
waiting for u r rply
thanks in advace
Comment