wrjarvis
Posts: 5
|
Posted: 07/16/2008, 1:14 PM |
|
Environment - DB:Oracle, Editable Grid, Table with 5 columns, pk_codeid, code, createdby, createdate
Insert and Update works just fine. For insert I use a user defined function in the common routine to get the primary key (pk_codeid) value from the table sequence which I have populate a hidden control in the before build insert and the rest is loaded by default...
What I am trying to control with no luck is the createdby and createdate columns. I have placed code in the before build (insert and update) events to load the current user and date to createdby and createdate respectively. The outcome with a insert or delete is all the row columns createdby and createddate get updated with that value... I am missing something here....
I have read all the post so far and some refer to custom insert and update definitions. OK that is cool but the directions of setting that up is clear as mud. So.... what am I missing and how is it done?
Thanks, I look forward to the replys.
Regards,
Will
|
|
|
wrjarvis
Posts: 5
|
Posted: 08/03/2008, 7:55 PM |
|
Wow...this post has been out there for a while and no one has ever faced this issue? How about some help......I was counting on someone out there much smarter than me....with this.... Thanks in advance...
|
|
|
wkempees
Posts: 1679
|
Posted: 08/04/2008, 3:03 AM |
|
Show us your code.
The BeforeBuilds I/U that is.
You are apparently not taking into account which row you are handling.
Assuming it is not the Oracle flavour being the culprit here.
FYI an editable grid has quirks as to recognizing inserts and updates.
No guarantees but effort will be given.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
|
|
wrjarvis
Posts: 5
|
Posted: 08/04/2008, 5:57 AM |
|
Ok... Issue resolved. Here is what I had to do with some direction with the codecharge support staff....
I had to figure out how to compare the grid label value to the value in the database at the time or before the row was being updated. Codecharge support pointed me to using the before executeupdate event to set the grid.datasource.cmdexecution to false when the value you were testing was not equal to the value in the database.. So what I did in the beforeexecupdate event was to put some code to do the following
if grid.object.value = ccdlookup(table col, table name, key= value of key from hidden field on grid row ) then
grid.datasource.cmdexecution = false
end if
this turns off the update for the rows where the field in question has not been changed....
It works like a champ....
thanks to the support folks for pointing me in the right direction.....
|
|
|
wkempees
Posts: 1679
|
Posted: 08/04/2008, 8:16 AM |
|
Could you alter the title of this post: start it with [SOLVED}
Thanks.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
|
|
|