我是 UCanAccess 的新手
package checktpsystemdatabase;
import java.sql.*;
public class CheckTPSystemDatabase {
public static void main(String[] args) throws SQLException {
try {
Connection con = DriverManager.getConnection("jdbc:ucanaccess://D:/Java/TransactionProcessingSystem/src/transactionprocessingsystem/Resources/TPSystem.accdb");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM Product");
while (rs.next()) {
System.out.println(rs.getInt(0) + "\t" + rs.getString(1) + "\t" + rs.getString(2));
}
rs.close();
} catch (SQLException e) {
System.out.println(e);
}
}
}
当我执行此代码时,它显示"net.ucanaccess.jdbc.UcanaccessSQLException: Column not found: 0"
. 请帮我!