Welcome! Log In Create A New Profile

Advanced

table colum update

Posted by emirhan 
emirhan
table colum update
January 30, 2009 03:40PM
Hi all,

I have a memory table. Also there are update and delete buttons near the table when I push the update button for a selected row the column CTRL_MODIF must updated as "M" and when I push the delete button for a selected row the column CTRL_MODIF must updated as "S"
The following code is supply this situation but,when I select the same row repeatly I could not see "M" or "S" on the table, probably they are deleted when I select the same row 2. times. Is there any way to solve the problem??? Thanks.

update button's code :
TableModifyLine(TABLE_BCK_current_backup,g_ID,"M")

g_ID is the selected row's number

delete button's code :
TableModifyLine(TABLE_BCK_current_backup,g_ID,"S")
Piet van Zanten
Re: table colum update
January 31, 2009 11:19PM
Hi,

If CTRL_Modif is the first column in your Table your code should work.
However, much simpler is:
update button: CTRL_MODIF[g_ID]="M"
delete button: CTRL_MODIF[g_ID]="S"
If you have a single selection table then even CTRL_MODIF="S" will do the job.

I also would like to suggest that you use a programming charter, which makes your code much more readable.
e.g CTRL_MODIF = col_modif , g_ID = nRowNr

Regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: