Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple SQL queries: Sending results where I want them

Status
Not open for further replies.

ataj44

Technical User
Oct 26, 2002
1
US
I'm new to Java and to JBuilder7, and am trying to import Excel data to run queries and display those queries in an applet.

What I have managed to do: I took data from an Excel spreadsheet, wrote it as a tab delimited text file, and brought it into JBuilder7 as a textDataFile. I created a database, got a connection, brought in queryDataSet, defined all my columns, added a parameter (ID), and wrote a SQL statement that successfully returns aggregate fields based on which ID parameter I type in. So far, so good.

Now I'm stuck. I want to add a drop-down menu of names (JComboBox?) and write code that links the users choices with the ID parameter for the SQL query. Actually, I have more than one query, and so I brought in a second queryDataset for the second query (is this the best way to do that?). By the time I'm done I'll have 9 or 10 queries (ProceedureDataSet?).

When the user selects a name from the list, I want 4 things to happen:
1. Display a jpg picture in a certain panel (don't know how to do this)
2. Return 5 aggregate fields from the first SQL query into 5 seperate text fields (jdbTextFields?)
3. Return qualifying rows of select fields from the second SQL query into a single text space (jdbTextArea?)
4. Execte a third query to bring in text from a separate file into another space (second jdbTextArea?).

I'm not a programmer, so I need to see what the code looks like (copy-n-paste) - the only way I'm managed to get this far is by following the built-in tutorials.

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top