public void executeUpdate(String s)
{
try
{
conn = DriverManager.getConnection(sConnStr,"sa","123");
Statement statement = conn.createStatement();
statement.executeUpdate(s);
}
catch(SQLException sqlexception)
{
System.err.println("aq.executeUpdate: " + sqlexception.getMessage());
System.err.println("aq.executeUpadatestrSQL: " + s);
}
} public void dbclose() throws SQLException{ //关闭数据库
if(conn!=null) conn.close();
if(rs!=null) rs.close();
}}
{
try
{
conn = DriverManager.getConnection(sConnStr,"sa","123");
Statement statement = conn.createStatement();
statement.executeUpdate(s);
}
catch(SQLException sqlexception)
{
System.err.println("aq.executeUpdate: " + sqlexception.getMessage());
System.err.println("aq.executeUpadatestrSQL: " + s);
}
} public void dbclose() throws SQLException{ //关闭数据库
if(conn!=null) conn.close();
if(rs!=null) rs.close();
}}
再用这个帐户登录,SA这个用户有权限是比较低的。
你现在能够用SELECT是本地WINDOWS验证的,本地当然是可以的。
我还真是粗心,改了前面,忘了后面:)也谢谢你,shuneng,我是该好好学学SQL SERVER 2000数据库了。