import java.sql.*; 
public class sql{ 
public static void main(String[] args) { String S[]=new String[23]; String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver"; String dbURL = "jdbc:microsoft:sqlserver://localhost:1433; DatabaseName=pubs"; String userName = "sa"; String userPwd = ""; Connection dbConn; 
try { Class.forName(driverName); dbConn = DriverManager.getConnection(dbURL, userName, userPwd); Statement stmt = dbConn.createStatement(); ResultSet rs = stmt.executeQuery("select state from authors");         int j = 0;             while (rs.next()) {             S[j]=rs.getString("state");             j++;             }             stmt.close();             dbConn.close(); } catch (Exception e) { e.printStackTrace(); } } } 
数据库我用的是sql2000自带的pubs中的authors表进行的测试(方便测试),结果和我自己数据库的表反映出的结果一样,对象名无效。
这段代码哪里有问题,请各位大侠帮忙指出,得不到想要的结果,反馈出对象名authors无效。