|
|
|
Re: Transaction Data which should store temporarily in database [message #596024 is a reply to message #596022] |
Tue, 17 September 2013 07:57 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
To provide a generic answer would be impossible unless we know the requirements. There could be multiple solutions.
If a code is used, it should be robust enough to cover all the possible scenarios that might come up in production. If temp/staging table is used, then it increases the overhead to maintain them. Alos, the Normalization should not be violated at any stage. And so on....
So, one can arrive at a solution, only after the requirements are clear and freezed.
|
|
|
Re: Transaction Data which should store temporarily in database [message #596025 is a reply to message #596024] |
Tue, 17 September 2013 08:04 |
|
stalin4d
Messages: 226 Registered: May 2010 Location: Chennai, Tamil Nadu, Indi...
|
Senior Member |
|
|
yes to this we should write code to acheive, my idea is
to create two blocks one is a database block and another is a
control block where we can use copy command to copy all the data into the
column of a database block and save it in that temp table(a non database block) and rollback it while the form is saved.
other any idea?
[EDITED by LF: removed unnecessary quote of the whole previous message]
[Updated on: Tue, 17 September 2013 10:52] by Moderator Report message to a moderator
|
|
|
Re: Transaction Data which should store temporarily in database [message #596038 is a reply to message #596025] |
Tue, 17 September 2013 11:07 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Stalin4d, I have difficulties in understanding what you are asking. Why? Because you use no punctuation (but commas, and they are placed in the most unusual places so they don't help either). If possible, try to write in sentences. Terminate every sentence with a dot (full stop). If you manage to write your messages that way, that would be really nice.
From what I managed to understand, here's what I think: the principle you described is wrong. Validation, in a Forms application, should be done within WHEN-VALIDATE-ITEM trigger (on an item level) and/or WHEN-VALIDATE-RECORD trigger (on a record level). I believe that it is useless to let users enter (for example) 10 records, each consisting of 10 to 25 items (as you said) and then fail the whole action because something was wrong.
Quote:
If i find that one data is entered wrongly then i will modify that Well, that would be some fancy code. How exactly will you modify it? If user enters 1, how do you know that it is wrong and modify it to 2. Why 2 and not 3 or 300?
What would you do with data you can't fix? Rollback everything?
If you insist on your approach, then why do you need two blocks? One would suffice, and it would be a data block created on the top of a global temporary table. You'd let users enter data into it, commit, perform that complex check & fix action, and - finally, when you are satisfied with the result, simply copy contents of the GTT table into the transaction table.
|
|
|
Re: Transaction Data which should store temporarily in database [message #596133 is a reply to message #596038] |
Wed, 18 September 2013 04:09 |
|
stalin4d
Messages: 226 Registered: May 2010 Location: Chennai, Tamil Nadu, Indi...
|
Senior Member |
|
|
Quote:If you insist on your approach, then why do you need two blocks? One would suffice, and it would be a data block created on the top of a global temporary table. You'd let users enter data into it, commit, perform that complex check & fix action, and - finally, when you are satisfied with the result, simply copy contents of the GTT table into the transaction table.
That is the point u have catched, i got the idea too, we need to first insert that data into a Global Temporary table and then if satisfied with then we can copy or insert the contents into the Transaction Table and rollback after inserting into transaction table.
|
|
|
|
|
|
|
|