直接用java.sql.*;好了.你看看JAVADOC吧.

解决方案 »

  1.   

    访问数据库最好直接做个类,不要在APPLET里直接用
      

  2.   

    try{ String driver_name ="com.microsoft.jdbc.sqlserver.SQLServerDriver";
    final String conString = "jdbc:microsoft qlserver://ht-cw:1433;databaseName=cw;user=sa;password=";
    Class.forName(driver_name).newInstance(); Connection con = DriverManager.getConnection(conString);
    PreparedStatement a= con.prepareStatement(
      "select * from Signatrue");
      ResultSet b = a.executeQuery();
      String c;
      if (b.next()) {
    c = b.getString(1);
    //g1.drawImage(temp,100,100,this);
    //setBackground(Color.blue);
      }
          //关闭结果集
      setBackground(Color.blue);
          b.close();
          //关闭语句
          a.close();
    我试了一下不行
    编译没出错,运行时出错。找不到com.microsoft.jdbc.sqlserver.SQLServerDriver