package sql;import javax.swing.JOptionPane;
import java.sql.*;
import java.awt.*;public class OneDeath2 {
public static void main(String[] args) { try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");       
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
ResultSet rs1 = null;
ResultSet rs2 = null;

conn =DriverManager.getConnection("jdbc:microsoft:sqlserver://222.129.68.152;DatabaseName=chris","sa","");
stmt = conn.createStatement(); String Sno1 = JOptionPane.showInputDialog("请输入学号");
String Sn1 = JOptionPane.showInputDialog("请输入姓名");
String age1 = JOptionPane.showInputDialog("请输入年龄");    rs = stmt.executeQuery("insert into student(sno) values('"+Sno1+"')");
    rs1 = stmt.executeQuery("insert into student(sn) values('"+Sn1+"')");
    rs2 = stmt.executeQuery("insert into student(age) values('"+age1+"')");}

   catch(Exception e){
  
   e.printStackTrace();
   }}
}感觉没什么问题,但是报错:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]No ResultSet set was produced.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
atcom.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)
at sql.OneDeath2.main(OneDeath2.java:27)