出于某种原因,这令我感到困惑。我在嵌入式Derby DB中有几个表,所以我测试了一个SELECT查询(每个表有大约5行数据):
// Doesn't produce and results in the application
Statement st = DataSource.getDbConnection().createStatement();
ResultSet rs = st.executeQuery("SELECT * FROM LOGS");
// Does produce results
Statement st = DataSource.getDbConnection().createStatement();
ResultSet rs = st.executeQuery("SELECT * FROM STATIONS");
LOGS架构:
你看到我遗失的任何东西吗?当我在Eclipse的Database Development透视图中运行相同的查询时,两个查询都会产生结果。