Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Deleting Rows in Master-Detail tables
Fri, Jul 24 2020 7:53 PMPermanent Link

Richard Harding

Wise Nutrition Coaching

Tim

I am still having trouble deleting the detail rows in master-detail tables in one transaction. Editing and inserting rows are now working but not deletion.

A Brand may have many Models. For example, Caterpillar brand has many models such as D7, D8 and D9.

Below are the row operations used to retrieve BRANDS and MODELS.

{ "Rows": [
{ "ID": 13, "Brand": "<Unknown>" },
{ "ID": 6, "Brand": "bdynam" },
{ "ID": 1, "Brand": "BERCO" },
{ "ID": 8, "Brand": "CASE" },
{ "ID": 2, "Brand": "CAT" },
{ "ID": 4, "Brand": "EX.   UKW  " },
{ "ID": 10, "Brand": "ITR" },
{ "ID": 5, "Brand": "KOBOTO" },
{ "ID": 7, "Brand": "kom" },
{ "ID": 3, "Brand": "KOM OEM" },
{ "ID": 9, "Brand": "OEM" },
{ "ID": 12, "Brand": "x hypac" },
{ "ID": 18, "Brand": "x kings" }] }

{ "Rows": [
{ "ID": 46, "Brand": "CAT", "Model": "A111" },
{ "ID": 44, "Brand": "CAT", "Model": "D1" },
{ "ID": 43, "Brand": "CAT", "Model": "D10" },
{ "ID": 8,  "Brand": "CAT", "Model": "D11" },
{ "ID": 25, "Brand": "CAT", "Model": "D2" },
{ "ID": 45, "Brand": "CAT", "Model": "D2" },
{ "ID": 32, "Brand": "CAT", "Model": "D6" },
{ "ID": 33, "Brand": "CAT", "Model": "D7" },
{ "ID": 11, "Brand": "CAT", "Model": "D8" },
{ "ID": 12, "Brand": "CAT", "Model": "D9" }] }

A request to delete the "Caterpillar" model "A111" results in the following operations.

{ "Operations": [
{ "DataSet": "esModels2", "RowSet": 11,
"Operation": 3,
"BeforeRow": { "EWBRowID": 1, "ID": 46, "Brand": "CAT", "Model": "A111" },
"AfterRow": null }
] }

EWB3 complains that:

No rows affected by the Delete command execution for the esModels2 dataset:

The request looks OK to me but EWB3 disagrees.

Richard
Thu, Sep 17 2020 3:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< I am still having trouble deleting the detail rows in master-detail tables in one transaction. Editing and inserting rows are now working but not deletion. >>

Let me know if you're still seeing this issue with Build 17.  If so, then most likely the issue is with either your dataset parameters for the detail dataset, or with how you have defined the delete command for the detail dataset (wrong parameter names, etc.).

Thanks !

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Sep 25 2020 11:58 PMPermanent Link

Richard Harding

Wise Nutrition Coaching

Tim,

I recreated the datasets and rebuilt the form. Deletion, updates and inserts are all working fine,

Both the datasets and form look the same to me as the previous version but I must have missed something the first time.

Are the changes to the dataset SQl commands effective immediately? Sometimes it appears that there is a delay but I am not sure.

Richard
Mon, Oct 26 2020 12:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< Are the changes to the dataset SQl commands effective immediately? Sometimes it appears that there is a delay but I am not sure. >>

There shouldn't be a delay - all server objects are versioned so that they don't disturb existing requests, but any subsequent requests should pick up the latest version of a given server object.

Tim Young
Elevate Software
www.elevatesoft.com
Image