aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes retrieving data from table and saving into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "retrieving data from table and saving into database" Watch "retrieving data from table and saving into database" New topic
Author

retrieving data from table and saving into database

Anita Nair
Greenhorn

Joined: Apr 02, 2010
Posts: 4
hello,

I have used Table and passed it to a TableEditor element.
I have a few text boxes and combo from which the user enters data.
Then there is a editable table using which user is allowed to enter data into table directly.
I want to know how to know how many rows have the user entered data when they click on the save button.
also how to save multiple rows to the db at the same time ie on click of save button. my code doesnt seem to work
There is also a delete and edit button. Please help.
Here is my code.




Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19788
    
  20

ItDoesntWorkIsUseless. Does the code throw an error? Does it get called at all? What exactly is not working?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Anita Nair
Greenhorn

Joined: Apr 02, 2010
Posts: 4
my code is as given below..
now i want to allow users to enter data directly into the table..
on the click of save button i want to know how many rows the user has entered so that i can save it into my database using for loop
now i am doing it by reading a textbox which asks the user for the number of rows they want to enter.
Though this is very inefficient i dont know what else to do? Please help


Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1096
    
  10

Anita, Welcome to the Ranch!

You have to first write your own TableModel from which you can get the number of rows and all the data. My sugeestion would be to start reading the tutorial about tables.

You have posted code of 400 lines with db code which doesn't really help. You should create a SSCCE and post the code.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Anita Nair
Greenhorn

Joined: Apr 02, 2010
Posts: 4
thanks..
another question is that one of my column in the table is a droprdownbox based on the value of which i want to hide /show another column.
how do i do this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: retrieving data from table and saving into database