Home > database >  Distribution files location is not the only problem
Distribution files location is not the only problem

Time:09-21

From table ac23 position number, as shown in sle7, 8,9,10 box, the four characters baa6 sign is available, if the update is successful, change baa6 to 1, if the update is not successful, prompt error and returns,
The question now is whether the duplicate allocation position number, don't know how to solve this problem should be

Dw_1. Settransobject (sqlca)
S_sql="select id, baa1, baa2 debt, baa3, baa4, baa5, baa6 from ac23 where baa5=2 and baa6=0 order by baa1, baa2 debt, baa3, baa4"
Dw_1. Setsqlselect (s_sql)
Dw_1. Retrieve ()
//
//
Sle_7. Text=string (dw_1. Getitemnumber (1, 'baa1))
Sle_8. Text=string (dw_1. Getitemnumber (1, 'baa2 debt))
Sle_9. Text=string (dw_1. Getitemnumber (1, 'baa3))
Sle_11. Text=string (dw_1. Getitemnumber (1, 'baa4))
S_sql="update ac23 set baa6=1 where id=" + string (dw_1. Getitemnumber (1, 'id')) + "and baa6=0"
The EXECUTE IMMEDIATE: s_sql USING sqlca;
//if the update record number is 0, explain to anyone else took the same position number
If the sqlca. Sqlnrows=0 then
Messagebox (' prompt ', 'distribution position number error, please try again in a')
Sle_7. Text='
Sle_8. Text='
Sle_9. Text='
Sle_11. Text='
ROLLBACK;
Return

end if

CodePudding user response:

 
By DW update properties to control concurrency issues,
The where clause for update/delete selected key and updateable columns
The key Modification choose use delete then insert

CodePudding user response:

Because the file number assigned in ac23 need recycling, so we make is so complex that
I will try to update properties of dw
  • Related