Result Sets easy one I need help need Asap Please guys

Result Sets easy one I need help need Asap Please guys

Post by modulo » Wed, 21 Apr 1999 04:00:00



I was wondering with a ResultSet I want to display results in a JListBox

lets say my ResultSet returns customer names

the result set returns
kevin
mat
david

IN THE TABLE CALLES CUSTOMER THE FILEDS EXIST
CustomerID,Name,PhoneNumber

then I want to put thouse names in a list box
but what I want to do is when the user clicks in one of those names in the
list box
I want to be able to display the PhoneNumber in a JTextField box
is this possible to do?

 
 
 

Result Sets easy one I need help need Asap Please guys

Post by Andree Gro? » Thu, 22 Apr 1999 04:00:00



> I was wondering with a ResultSet I want to display results in a JListBox

> lets say my ResultSet returns customer names

> the result set returns
> kevin
> mat
> david

> IN THE TABLE CALLES CUSTOMER THE FILEDS EXIST
> CustomerID,Name,PhoneNumber

> then I want to put thouse names in a list box
> but what I want to do is when the user clicks in one of those names in the
> list box
> I want to be able to display the PhoneNumber in a JTextField box
> is this possible to do?

Change your SQL-Statement. Use:
  select CustomerID,Name,PhoneNumber from customer

Read the ResultSet as follows:
  while (rs.next())
  {
     String id = rs.getString(1);
     String name = rs.getString(2);
     String phone = rs.getString(3);
  }

Save data in 2-dimansional Array (for Example) to handle later.

Regards, Andree

 
 
 

Result Sets easy one I need help need Asap Please guys

Post by Andree Gro? » Thu, 22 Apr 1999 04:00:00


What about your reply-address ?????
 
 
 

1. New guy needs help please.

    I design relational databases but am fairly new to FileMaker 5.0.  I
have 5 db files working together.  From the switchboard db I have
buttons that I want to use to :
1. minimize switchboard
2. open the selected db in browse
3. complete whatever tasks I need to complete there and after clicking
close
4. maximize switchboard again

My problem.
Can I write one script that will work across my 5 db files or is the
script db specific.  I can get swithboard to minimize and the next db to
open but beyond that I cannot seem to influence the opened db further
from the script written and executed from switchboard.

Thanks for the help.

Also can someone recommend a good book that will help me to create
relational solutions in FileMaker etc.

  pierre.lessard.vcf
< 1K Download

2. Ways to execute Script ?

3. Need Help-Please Call ASAP

4. Datagrid coloring

5. need help asap PLEASE!!

6. Table Defragmenting

7. Crashing Install - I need HELP ASAP Please

8. Inner & Outer Joins

9. Need Help with sp_extendsegment command ASAP!!! Please

10. I really need help. Please - ASAP

11. Please NEED HELP A.S.A.P S.O.S !!!!!!!!!!!!!

12. bulk copying-need help please answer ASAP