ckroon
Posts: 869
|
| Posted: 06/19/2010, 2:53 PM |
|
Hi All.
I managed to create a page where a user loads 4 URL values (date, typeid, monthid and yearid), then uploads a CSV file into a table. It works great. I have a review page where they can see the records they just uploaded.
What I need here is a button that will enable them to delete everything they just uploaded.. in case they messed up and uploaded the wrong file.
I have been trying to do it on my own with the limited code I could find but am not having much luck at all.
I am assuming it will be on a buttons Server side On Click Event...?
I need it to: Delete all records from table: 'payments_main' where ( pdate=date AND pmonth=monthid AND pyear = yearid AND ptype=typeid)
Any help would be greatly appreciated....
_________________
Walter Kempees...you are dearly missed. |
 |
 |
MichaelMcDonald
Posts: 640
|
| Posted: 06/19/2010, 3:38 PM |
|
Are you intending that they realise the mistake and correct it while logged into the computer at the same time immediately following the mistake, or that they are able to correct the mistake at a later date/time?
_________________
Central Coast, NSW, Australia.
|
 |
 |
ckroon
Posts: 869
|
| Posted: 06/19/2010, 4:02 PM |
|
Hi Mike thanks for responding.
My intention is for them to delete it while they are still logged in and the URLS are still present...
I would actually like to do it on a pages Before Show or on initialize event... I will just have a link to that page.
_________________
Walter Kempees...you are dearly missed. |
 |
 |
Waspman
Posts: 948
|
| Posted: 06/20/2010, 8:35 AM |
|
I do this with an upload log. The user uploads the file, the data is the displayed. The log file connects to a form with the update and delete button changed to accept and decline. Then I hijack the delete code to include my filters.
The user can then return to the records to confirm at a later date.
I also upload the file and store it. Then the user can insert it later. This way they can go back to a previous copy.
HTH...T
_________________
http://www.waspmedia.co.uk |
 |
 |