DACProviderQuery := TUniQuery.Create(Self);
DACProviderQuery.CachedUpdates := True;
//DACProviderQuery.LocalUpdate := True;
DACProviderQuery.Options.SetFieldsReadOnly := False;
DACProviderQuery.Options.RequiredFields := False;
DACProviderQuery.Options.EnableBCD := False;
DACProviderQuery.Options.EnableFMTBCD := True;
//DACProviderQuery.Options.TrimVarChar := True;
DACProviderQuery.UniDirectional := True;
DACProviderQuery.ReadOnly := True;
//DACProviderQuery.SpecificOptions.Values['FetchAll'] := 'False';
DACProviderQuery.Options.StrictUpdate := False;
But the execution to the "DACProviderQuery.ReadOnly := True;", then raise a exception "FetchRows must be 1..65535"
When I commented on this line, running well
The above code in version 3.7 is no problem, change to appear after 4.1.5
at build with runtime packages
thanks
FetchRows must be 1..65535
-
AndreyZ
But in the implementation of the " DACProviderQuery.ReadOnly := True;" times is wrong, I followed to the code DBAccess.pas in" TCustomDADataSet.SetFetchRows", I find the value of Value is 738209785, this is an automatically generated, I did not assign to this, very much like a local variable is not initialized, because this is the value of Value for each run are not the same.
-
AndreyZ
Delphi 7 build 8.1
I don't have to make any changes, just add a message output
procedure TCustomDADataSet.SetFetchRows(Value: integer);
begin
if FFetchRows Value then begin
CheckInactive;
Showmessage(Inttostr(Value));
if (Value 65535) then
DatabaseError(SInvalidFetchRows);
FFetchRows := Value;
if FIRecordSet nil then
FIRecordSet.SetProp(prFetchRows, FetchRows);
end;
end;
I don't have to make any changes, just add a message output
procedure TCustomDADataSet.SetFetchRows(Value: integer);
begin
if FFetchRows Value then begin
CheckInactive;
Showmessage(Inttostr(Value));
if (Value 65535) then
DatabaseError(SInvalidFetchRows);
FFetchRows := Value;
if FIRecordSet nil then
FIRecordSet.SetProp(prFetchRows, FetchRows);
end;
end;
-
AndreyZ