Home > Back-end >  Urgent ask ace to solve this problem: dbExpress performing ApplyUpdate tip "because beyond the
Urgent ask ace to solve this problem: dbExpress performing ApplyUpdate tip "because beyond the

Time:09-24

Development environment for Windows 7 64 + SQL SERVER2008 R2 + DELPHI XE8;
Using Datasnap system architecture, data access engine as dbExpress, database connection and QUERY, are put in a DataModule DataSetProvider, program interface of ClientDataSet, is placed on the FORM, use the RemoteServer connection DataModule DataSetProvider,
Scenario is now a dbExpress TSQLConnetion space articulated TSQLQuery controls a number a ClientDataSet execution ApplyUpdate update the data suggests that "due to capacity exceeds the limit, cannot create a new transaction", the same set of ClientDataSet, DataSetProvider, this alone a SQLConnect can normal use ApplyUpdate update data,

Now don't know where the problem is, there is no a set of data using a SQLConnect alone,

CodePudding user response:

The code tracking, error here:
The function TCustomProvider. DoApplyUpdates (const Delta: OleVariant; MaxErrors: Integer;
The out ErrorCount: Integer; Var OwnerData: OleVariant) : OleVariant;
The begin
SetActiveUpdateException (nil);
Try
Try
If Assigned (FOnValidate) then
FOnValidate (Delta);
DoBeforeApplyUpdates (OwnerData);
Self. OwnerData:=OwnerData;
Try
Result:=InternalApplyUpdates (Delta, MaxErrors, ErrorCount);
The finally
OwnerData:=Self. OwnerData;
Self. OwnerData:=the unassigned;
end;
Except,
On E: the Exception do
The begin
SetActiveUpdateException (E);
Raise;
end;
end;
The finally
Try
DoAfterApplyUpdates (OwnerData);
The finally
SetActiveUpdateException (nil);
end;
end;
end;

CodePudding user response:

Run to:
Result:=InternalApplyUpdates (Delta, MaxErrors, ErrorCount);
Abnormal will pop up,

CodePudding user response:

Days before tracking the source code, find the transaction capacity problems, is caused some read the code of the basic information of the dictionary, I made a read a dictionary in the program list based information function, FORM returns the ClientDataSet to display the data packet, the code is this:
 
QryDictionary. Close;
QryDictionary. ParamByName (' Type '). AsString:=infotypes;
QryDictionary. Open;
Result: the self=. DspDictionary. Data; }
QryDictionary. Close;

DspDictionary is a DataSetprovider control, this code is called repeatedly TSQLConnect right around ten times used to at the beginning of the transaction will prompt transaction capacity lack, there is no question of calls to start transactions when two or three times, then don't dbExpress engine, using ADO engine will not appear this problem, so now the preliminary judgement is dbExpress data engine problem, but should from which aspects to solve?

PS: the question I sent also nobody answered, so many days seemed really rarely now using DELPHI,

CodePudding user response:

Dbxpress original architecture is very good, just the problems! Especially after the delphi7, total feel not stable!

CodePudding user response:

Many limited conditions ApplyUpdate itself, is not working,
Write a similar function method, instead,
  • Related