• Subject: RE: How do you select from a JTable?
  • From: "Christopher J. Jewell" <jewellcj@xxxxxxxxxxxxxxxxx>
  • Date: Fri, 23 Oct 1998 22:02:10 -0700
  • Importance: Normal

I've been playing with the AS/400 Toolbox for Java  SQLTableModel and
SQLTablePane beans.  Again I connect to the database (using SQLConnection),
but cannot fill the table pane (I'm using swing components and VisulaAge
2.0).

The way these beans are designed, you ought to be able to pop an
SQLConnection bean, a SQLTableModel bean and an SQLTablePane onto the Visual
Composition Editor and connect the 'connection' object to the 'tablemodel'
object (specifying also a query string) and then tell the SQLTabelPane that
the SQLTableModel is the JTable's Table Model.

When I do this, debug tells me that the Model is loading data and column
definitions correctly. However, the association with the SQLTablePane is not
working in my application, (nothing shows in the pane).

Another anoyance is that the 'Subfile Smart Guide', which you would expect
to give you the desired functionality, blows up with a 'syntax error' about
half way through generation of the code.

There's also a paucity of examples of this very common requirement shipped
with VisualAge. So, all in all, I'm a little disappointed.

Has anyone else had similar expreinces with getting data into a JTable using
VisulaAge 2.0?

Chris Jewell
mailto://jewellcj@jewellconsult.com

> -----Original Message-----
> From: owner-java400-l@midrange.com
> [mailto:owner-java400-l@midrange.com]On Behalf Of Pete Hall
> Sent: Sunday, October 18, 1998 8:31 PM
> To: java400-L@midrange.com
> Subject: How do you select from a JTable?
>
>
> I've been playing with the JDBC bridge in Visual Age, and it's
> really pretty easy to connect to a database, but I can't figure
> out how to select a row from a JTable, and use one of the columns
> as the parameter for a new select. I must be making this a lot
> harder than it really is. I've tried using TableColumn objects,
> but that didn't seem to help much. Can anyone point me at an example?
>
> tia
> Pete
>
> Pete Hall
> peteh@inwave.com
> http://www.inwave.com/~peteh/
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to JAVA400-L@midrange.com.
> | To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> JAVA400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
>

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.