Multiple DW is updated at the same time, and there is a relationship in the table, and you need to pay attention to the bar.

zhaozj2021-02-16  39

Some questions when doing multiple tables at the same time.

It is necessary to write it, causing attention.

Although multiple DW (3) respective correspondence is a table, there is a relationship between these addresses, and DW is updated simultaneously.

For example: Table_1: ID, Name, SEX .......

Table_2: ... ID (has a correspondence with Table_1), Pro_1, Pro_2 ...

TABLE_3: ... ID (has a correspondence with Table_1), REG_TIME .....

Due to no experience:

For the first time, after the two DWs in the design, there is no choice with the item related to the first table ---- ID.

Later, I found that I could not update.

Only from the new design, the ID items of Table_2 and Table_3 are selected in their respective DW,

But in the interface, I don't want to make it, the best way ---

Setting their visable attributes to false, which is to remove "hook" before Visable in the attribute.

After the design is good, I started the coding:

IF dw_1.update () = 1 THEN

IF dw_2.update () = 1 THEN

IF dw_3.update () = 1 THEN

COMMIT;

Else

ROLLBACK;

END IF

END IF

END IF

----------------------------

But it is best to write it better:

File: // Dipped SQLCA attributes (General purpose) Boolean LB_TRANLB_TRAN = SQLCA.AUTOCOMMITSQLCA.AUTOCMMIT = FALSE

IF dw_1.update () <> 1 the messagebox ("Operation Tips", "DW_1 Data Save Failed!") ROLLBACK; SQLCA.AUTOCMMIT = LB_TRAN RETURNELSEIF DW_2.UPDATE () <> 1 Then MessageBox ("Actions Tips," DW_2 Data Save Failed! ") Rollback; sqlca.autocommit = lb_tran return (" Actions prompt "," DW_3 data save failed! ") rollback; sqlca.autocommit = lb_tran returnelse CommTend IF

-------------------------------------------------- ----------------------

转载请注明原文地址:https://www.9cbs.com/read-27316.html

New Post(0)