在dreamweaver中数据库连不上
<% try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(Exception e){}
Connection con=null;
Statement stmt=null;
ResultSet rs=null;
try{
con=DriverManager.getConnection("jdbc:odbc:sun","sa","442352");
stmt=con.createStatement();
rs=stmt.executeQuery("select * from table1");
while (rs.next())
{
out.print(rs.getString("number")+"<br>");
out.print(rs.getString("name")+"<br>");
}
con.close();
}
catch(Exception e){out.print(e.toString());}
%>
以上这段代码在IE中出现图片中的东西,为什么会未发现数据源呢???
[此贴子已经被作者于2007-9-24 22:05:27编辑过]