当前位置: 技术问答>java相关
怎样实现一行数据的打印?求求求救!
来源: 互联网 发布时间:2015-09-02
本文导语: 各位高手们,有没有人做过关于sql中关于当查询一行数据时,只打印这个所查询的数据项呀,最好有一些代码好吗? | TableScrollPane tableScrollPane1 = new TableScrollPane(); JdbTable jdbTable1 = new J...
各位高手们,有没有人做过关于sql中关于当查询一行数据时,只打印这个所查询的数据项呀,最好有一些代码好吗?
|
TableScrollPane tableScrollPane1 = new TableScrollPane();
JdbTable jdbTable1 = new JdbTable();
Database database1 = new Database();
QueryDataSet queryDataSet1 = new QueryDataSet();
database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:odbc:test", "", "", false, "sun.jdbc.odbc.JdbcOdbcDriver"));
queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT * FROM table WHERE name = 'name1'", null, true, Load.ALL));
jdbTable1.setDataSet(queryDataSet1);
JdbTable jdbTable1 = new JdbTable();
Database database1 = new Database();
QueryDataSet queryDataSet1 = new QueryDataSet();
database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:odbc:test", "", "", false, "sun.jdbc.odbc.JdbcOdbcDriver"));
queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT * FROM table WHERE name = 'name1'", null, true, Load.ALL));
jdbTable1.setDataSet(queryDataSet1);