M
Mariano
Then I have a result set named rs. I need that one column of ResultSet
rs will be in an array.
I've read about method getArray(), so i've thinked that my code will
be something like that:
================================
private void formWindowOpened(java.awt.event.WindowEvent evt)
{
ResultSet rs=mdbc.inviaQuery("select * from ... where ...");
try {
rs.next();
txtNome.setText(rs.getString("DB_COLUMN_NAME_1"));
rs.getArray("DB_COLUMN_NAME_2");
} catch {
// EXCEPTION
}
================================
Alas there's something that's go wrong and I get this error
(paziente.java552 is the line containing
rs.getArray("DB_COLUMN_NAME_2") where's my mistake:
Exception in thread "AWT-EventQueue-0"
java.lang.UnsupportedOperationException
at
sun.jdbc.odbc.JdbcOdbcResultSet.getArray(JdbcOdbcResultSet.java:4425)
at cc.Paziente.formWindowOpened(Paziente.java:552)
at cc.Paziente.access$000(Paziente.java:15)
at cc.Paziente$1.windowOpened(Paziente.java:94)
at java.awt.Window.processWindowEvent(Window.java:1187)
at javax.swing.JFrame.processWindowEvent(JFrame.java:266)
at java.awt.Window.processEvent(Window.java:1148)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:
242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:
163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:
110)
B
rs will be in an array.
I've read about method getArray(), so i've thinked that my code will
be something like that:
================================
private void formWindowOpened(java.awt.event.WindowEvent evt)
{
ResultSet rs=mdbc.inviaQuery("select * from ... where ...");
try {
rs.next();
txtNome.setText(rs.getString("DB_COLUMN_NAME_1"));
rs.getArray("DB_COLUMN_NAME_2");
} catch {
// EXCEPTION
}
================================
Alas there's something that's go wrong and I get this error
(paziente.java552 is the line containing
rs.getArray("DB_COLUMN_NAME_2") where's my mistake:
Exception in thread "AWT-EventQueue-0"
java.lang.UnsupportedOperationException
at
sun.jdbc.odbc.JdbcOdbcResultSet.getArray(JdbcOdbcResultSet.java:4425)
at cc.Paziente.formWindowOpened(Paziente.java:552)
at cc.Paziente.access$000(Paziente.java:15)
at cc.Paziente$1.windowOpened(Paziente.java:94)
at java.awt.Window.processWindowEvent(Window.java:1187)
at javax.swing.JFrame.processWindowEvent(JFrame.java:266)
at java.awt.Window.processEvent(Window.java:1148)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:
242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:
163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:
110)
B