Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1278 > unrolled thread

ResultSet and getArray()

Started by"Mariano" <mariano@THRWHITE.remove-dii-this>
First post2011-04-27 15:32 +0000
Last post2011-04-27 15:32 +0000
Articles 4 — 2 participants

Back to article view | Back to comp.lang.java.gui


Contents

  ResultSet and getArray() "Mariano" <mariano@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
    Re: ResultSet and getArra "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
      Re: ResultSet and getArra "Mariano" <mariano@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
        Re: ResultSet and getArra "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000

#1278 — ResultSet and getArray()

From"Mariano" <mariano@THRWHITE.remove-dii-this>
Date2011-04-27 15:32 +0000
SubjectResultSet and getArray()
Message-ID<1174600697.812091.223270@e65g2000hsc.googlegroups.com>
  To: comp.lang.java.gui
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#1281 — Re: ResultSet and getArra

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:32 +0000
SubjectRe: ResultSet and getArra
Message-ID<1174626635.508102.303930@p15g2000hsd.googlegroups.com>
In reply to#1278
  To: comp.lang.java.gui
On Mar 23, 8:58 am, "Mariano" <mariano.calan...@gmail.com> wrote:
..
> ..so i've thinked that my code will
> be something like that:

Please do not waste your time, and our bandwidth,
with code that is 'something like' the code you
are using (and it seems to me, that code you
posted is not even an accurate description of
the current code being used).

For these case, I recommend an SSCCE.
<http://www.physci.org/codes/sscce.html>

Andrew T.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1284 — Re: ResultSet and getArra

From"Mariano" <mariano@THRWHITE.remove-dii-this>
Date2011-04-27 15:32 +0000
SubjectRe: ResultSet and getArra
Message-ID<1174670632.575970.39070@e1g2000hsg.googlegroups.com>
In reply to#1281
  To: comp.lang.java.gui
On 23 Mar, 06:10, "Andrew Thompson" <andrewtho...@gmail.com> wrote:
> On Mar 23, 8:58 am, "Mariano" <mariano.calan...@gmail.com> wrote:
> ..
>
> > ..so i've thinked that my code will
> > be something like that:
>
> Please do not waste your time, and our bandwidth,
> with code that is 'something like' the code you
> are using (and it seems to me, that code you
> posted is not even an accurate description of
> the current code being used).
>
> For these case, I recommend an SSCCE.
> <http://www.physci.org/codes/sscce.html>
>
> Andrew T.

words... "my code will be something like that" that's why, i don't
know how to complete that code.
I have to assign rs.getArray("..."); content to an array, but it's not
so easy, at least for me.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1285 — Re: ResultSet and getArra

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:32 +0000
SubjectRe: ResultSet and getArra
Message-ID<1174722252.749504.54790@o5g2000hsb.googlegroups.com>
In reply to#1284
  To: comp.lang.java.gui
On Mar 24, 4:23 am, "Mariano" <mariano.calan...@gmail.com> wrote:
..
> > For these case, I recommend an SSCCE.
> > <http://www.physci.org/codes/sscce.html>
...
> words... "my code will be something like that" that's why, i don't
> know how to complete that code.

I am not that concerned with how you
think the code *might* be completed.
That is not the point.

What is more useful is an answer to the
question 'what is the *exact* code you are
currently using - that makes this error'?

That code you posted, *cannot* be the
code you are using, since it would not
even compile, let alone run.

But 'the complete code' would not be very
welcome here either (I note that your
stacktrace implies it has 500+ lines of
code).  Instead, an SSCCE (did you read
the article?) would be short, descriptive,
and help us to help you.

> ..but it's not so easy, at least for me.

That's why we get 'the big bucks'.  If writing
software was easy, they would get monkeys to
do it.   ;-)

Andrew T.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web