Skip to Content
0
Former Member
Aug 03, 2005 at 07:16 AM

Delete Row issue

43 Views

Hi again,

I have some questions with deleting master data line rows in an UDO form.

<b>A)</b>

Basicly this is the situation:

<b>Step 1 -</b> While adding a new master record, I give an auto value to the main record and add some data lines in a matrix, e.g 4 rows.

<b>Step 2 -</b> I delete 2 of these rows before hitting the "Add" button on the form.

But after adding the main record, I check it and see 2 rows with correct values and also <u>previously deleted 2 rows with empty values</u>.

Why ?

(<i>In my opinion, before clicking the Add button, LineId isn't created and associated to a row, cos I show that field for each row in my matrix and it doesn't have any value before adding or updating the main record.</i> )

<b>B)</b>

When deleting rows that have LineIDs <b>in an UDO FORM</b>, should these steps followed for deleting these records and updating the matrix ?

<b>1.</b> Catch the Code and LineIds to be deleted in an array.

<b>2.</b> After clicking update, execute a delete query for these array elements in db and delete related lines.

<b>3.</b> Reload matrix (oMatrix.LoadFromDataSource)