craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > General QuickTable Support/Help Post New Topic   Post A Reply
delete() fails when reordered printer friendly version
next newest post | next oldest post
Author Messages
rarenal
Unregistered
Edit or delete this message Reply w/Quote
Posted Tuesday, April 10, 2007 @ 06:44:06  

Hi.

I'm using the latest version of quicktable.

I'm using the delete() method to remove the selected rows from dbTable, no from database. If I reorder the content and then removed the selected rows using delete() method it fails. It is the same selecting after o before calling delete(). The getSelectedRows() works properly, but using dbTable.delete(dbTable.getSelectedRows()) fails again.

The control panel also faisl to represent the number of rows after delete(), even without reordering before delete.

Thanks in advance.

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Wednesday, April 11, 2007 @ 09:17:39  

Please enable debug using dbtable.debug=true;

and check whether you get any error messages in your command prompt.

If you don't see any errors, please try to reproduce the error in the basic quicktable example QuickTableFrame.java and post in the forum.

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Thursday, April 12, 2007 @ 02:26:19  

Ok.

I've done it with your QuickTableFrame.java example.

When I run the example the table shows 4 registers.

Add a fith one like this:
Emp_Number=5
Emp_Name=peter
Emp_Dept=2
Emp_Location=r

Then I reorder by Emp_Dept column by clicking in the header.

With control key I select the register with Emp_Number=1, then I have the Emp_number=1 and Emp_number=5 registers selected. You also can select register Emp_number=1 without control key and after select register Emp_number=5 with control key it doesn't matter.

I press the cut button to delete both, and registers with Emp_number=1 and Emp_number=4 ?? disappeared, but the Emp_number=5 is there.

Thanks in advance.

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Tuesday, April 17, 2007 @ 02:57:51  

Hi.

Have you seen the bug? Are you on it?

We are using the delete() method in our code and we need an answer.

Thanks in Advance.

[Edit by rarenal on Tuesday, April 17, 2007 @ 02:58:21]

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Tuesday, April 17, 2007 @ 05:10:52  

This might be a bug. Please use the method getOriginalColumnIndex(int colIndex) method to convert the array which you get from getSelectedRows() and then pass it to delete() method.

We will look into this.

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Tuesday, April 17, 2007 @ 06:19:01  

Hi.

The bug is related to ROWS, it is not related to columns.

I suppose getOriginalColumns returns the original index of a column if it was moved (reordered) , but my problem is related with reordered ROWS.

Have you tried the example I've posted you?

Thanks in advance.

[Edit by rarenal on Tuesday, April 17, 2007 @ 06:21:05]

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Wednesday, April 18, 2007 @ 05:59:10  

My mistake. You are right we cannot use the getOriginalColumnIndex().

I think I have a better understanding of your problem now.

After you have added a new row, call the save() method before you click the column header to sort the rows. This way the column will be updated to database. Now sort the rows and then click the delete button and see whether it works.

As I mentioned before once you enable debug, you will get more debug messages. If the above does not work, send me the debug messages.

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Wednesday, April 18, 2007 @ 06:20:09  

Hi.

I use the quickTable just to show data, it has no direct relationship with the database.

The thing is that the bug is not in my code.

Using your example QuickTableFrame.java without adding any row, only with the four rows you load, the bug is there:
0 Run the QuickTableFrame.java example
1 Order by Emp_Dept by clicking the column header,
2 Select the row with Emp_Number = 2
3 With the "Control key" pressed select Emp_Number = 3 (then you have selected rows with Emp_number 2 and 3)
4 Press delete button.
5 The rows with Emp_Number = 2 and Emp_Number = 4 are deleted, and remains the Emp_number = 3.

Thanks in advance.

[Edit by rarenal on Wednesday, April 18, 2007 @ 06:20:38]

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Monday, April 23, 2007 @ 04:48:17  

Hi.

As you asked me this is the only message I've received after setting "dbtable.debug=true;" in my code:

deleteSql not set for DBTable, so this record is not deleted in database

As I told you I'm only using the dbtable to show data.

Hope it helps.

Thank you very much and I'm sorry for your holydays. ;)

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Thursday, May 3, 2007 @ 03:06:39  

Hi.

Is there any advance with this bug? Have you reproduce it?

We need a solution.

Thanks in advance.

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Friday, June 15, 2007 @ 06:40:26  

Hi, I'm here again.

I've tried your version 2.0.5.27, and the bug is there.

You can reproduce it using your sample called QuickTableFrame.bat.
You have to add the next six rows using the "add row" button:

row1
EMP_NUMBER=5 EMP_NAME=a EMP_DEPT=2
row2
EMP_NUMBER=6 EMP_NAME=b EMP_DEPT=3
row3
EMP_NUMBER=7 EMP_NAME=c EMP_DEPT=3
row4
EMP_NUMBER=8 EMP_NAME=d EMP_DEPT=1
row5
EMP_NUMBER=9 EMP_NAME=e EMP_DEPT=2
row6
EMP_NUMBER=10 EMP_NAME=f EMP_DEPT=3

Then reorder by EMP_DEPT, and select only the registers with EMP_DEPT=2.
Press delete button and the row with EMP_NUMBER=9 and EMP_DEPT=2 remains in the table. :?

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Friday, June 15, 2007 @ 07:13:21  

Hi.

I've seen that the version I've downloaded is version 2.0.5.25. Is there a problem with the number of the version that it is reporting? I'm using an "out of date" link?
Where can I download the 2.0.5.27 version?

Thanks in advance.

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Friday, June 15, 2007 @ 10:51:03  

Please download the demo version and check whether it works. Once you confirm that it works, we will give you the actual release zip file.

You should use the version 2.0.5.27

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Monday, June 18, 2007 @ 01:26:06  

Hi.

I've tried the 2.0.5.27 version. It works OK. The only "problem" is that it deletes the selected rows, but if you have the control panel, the number of rows dont change, it remains as it was when you load the data, it also happened before.

Where can I download the final version?

Thanks

[Edit by rarenal on Monday, June 18, 2007 @ 01:37:21]

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Monday, June 18, 2007 @ 09:49:18  

we will fix the number of rows problem and then give you the final version
Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Monday, June 18, 2007 @ 21:38:39  

We tried this unfortunately, we cannot reproduce this.

Are you able to reproduce in QuickTableFrame.java sample?

rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Tuesday, June 19, 2007 @ 01:14:39  

Hi.

I'm sorry, it is OK, it was my fault.

Where can I download the 2.0.5.27 release?

Thanks.

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Tuesday, June 19, 2007 @ 21:47:35  

Please download from the same location which you downloaded before. It has been updated with the latest version.
rarenal
Private First Class

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 11

Click here to see the profile for rarenal Send email to rarenal Send private message to rarenal Find more posts by rarenal Edit or delete this message Reply w/Quote
Posted Wednesday, June 20, 2007 @ 08:14:04  

Hi.

I've downloaded the latest version and it deletes the selected rows OK.

Thanks.

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios