Java Code Examples for javax.sql.rowset.WebRowSet#setCommand()
The following examples show how to use
javax.sql.rowset.WebRowSet#setCommand() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JdbcRowSetLiveTest.java From tutorials with MIT License | 5 votes |
@Test public void createWebRowSet_SelectCustomers_WritetoXML_ThenCorrect() throws SQLException, IOException { WebRowSet wrs = new WebRowSetImpl(); wrs.setUsername(username); wrs.setPassword(password); wrs.setUrl(url); wrs.setCommand(sql); wrs.execute(); FileOutputStream ostream = new FileOutputStream("customers.xml"); wrs.writeXml(ostream); }