Home > Back-end >  An error has occurred UniDac 4.6.12 Xe2 table more updates
An error has occurred UniDac 4.6.12 Xe2 table more updates

Time:10-19

Table 1: the salesman
Salesid salesname
Zhang SAN 1

2, dick, and harryTable 2: sales
Orderid salesid
1 1
2 2
Uniquery1 SQL
Select s1. Orderid. S1, s2. Salesname salesid
From the sales s1 left outer join salesman s2
On s1. Salesid=s2. Salesid
When change salesid, use the select salesname from salesman where salesid=: salesid obtain salesname to update uniquery1 salesname
Already set uniquery1 cacheupdates is true.
Update statement is as follows:
If not UniConnection1. InTransaction then begin
UniConnection1. StartTransaction;
Try
UniQuery1. ApplyUpdates;
UniConnection1.Com MIT;
Except,
UniQuery1. The CancelUpdates;
UniConnection1. Rollback;
end;
end;
Question:
1. If you don't change salesid, no matter how many times change, no problem.
2. If change salesid, modify saved no problem for the first time, second to save error: connections is busy with the results for another command
3. If at the same time change a multi-line salesid, save the problems like the 2.
4. Use UniUpdateSQL useless.

CodePudding user response:

If you don't use cacheupdates is true, there is no issue.
Use the following updates, as well as problems:
If not UniConnection1. InTransaction then begin
UniConnection1. StartTransaction;
Try
UniQuery1. ApplyUpdates;
UniConnection1.Com MIT;
Except,
UniQuery1. RestoreUpdates;
UniConnection1. Rollback;
Raise;
end;
UniQuery1.Com mitUpdates;
end;

CodePudding user response:

Unidac I also recently in trial
Was found to have a lot of bugs, I'm afraid I finally still have to use ado to
Is really depressed
For the first time such as unidac performed in the proc unistoredproc perform ok the second error is always will prompt previous run things
CSDN post to ask for a long time nobody reply
Estimated unidac with few people, specific also don't know
Also, please advise,

CodePudding user response:

Ha ha, my own problem, a primary error, I only just arrived from Ado to unidac made such a mistake. Suggest not to turn back to the Ado, Ado really out of date.
  • Related