我这样为什么不能连接sql server 数据库阿!急
q3643 2003-04-03 08:17:57 <%@page import="java.sql.*"%>
<html>
<head>
<title>TestPage</title>
</head>
<%Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:test","sa","");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(" SELECT * FROM S ");
while(rs.next()){
%>
<h1>Hello <%=rs.getString("name")%>!<br></h1>
<h1>your no is <%=rs.getString("no")%><br></h1>
<% }
if (rs!=null) rs.close();
if (stmt!=null) stmt.close();
if (con!=null) con.close();
%>
</html>