我正在使用来自 CData(cdata.com) 的 JDBC 驱动程序来访问 QuickBooks 实例。下面的代码就在 CData 网站上(qbConnString 除外)。getConnection 调用工作正常,但执行查询时会引发异常。
connection = DriverManager.getConnection(qbConnString);
String cmd = "INSERT INTO Customers (LastName) VALUES (?)";
QuickBooksPreparedStatement pstmt =
(QuickBooksPreparedStatement) connection.prepareStatement(cmd,
Statement.RETURN_GENERATED_KEYS);
pstmt.setString(1, "Hook");
int count = pstmt.executeUpdate();
System.out.println(count + " rows are affected");
ResultSet rs = pstmt.getGeneratedKeys();
while (rs.next()) {
System.out.println(rs.getString("ListId"));
}
connection.close();
这是调用 executeUpdate 时生成的堆栈跟踪:
XcoreXquickbooksX160X6254.ymc: The attribute name is required by RSBOperation.
at XcoreXquickbooksX160X6254.qi.executeUpdate(Unknown Source)
at app.JDBCConnect.qbConnect(JDBCConnect.java:49)
at app.JDBCConnect.<init>(JDBCConnect.java:34)
at app.JDBCConnect.main(JDBCConnect.java:25)
所以我的问题是:什么是 RSBOperation,我在哪里可以找到有关缺失要求的文档?