Page 1 of 1

FetchRows must be 1..65535

Posted: Mon 12 Mar 2012 15:08
by samin
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

Posted: Tue 13 Mar 2012 10:16
by AndreyZ
Hello,

The "FetchRows must be 1..65535" error occurs only if you try to set the TUniQuery.FetchRows property to a value that is out of the 1..65535 range. To avoid this problem, you should not set the FetchRows property less than 1 or more than 65535.

Posted: Tue 13 Mar 2012 12:39
by samin
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.

Posted: Tue 13 Mar 2012 13:26
by AndreyZ
Please specify the exact version of your IDE. Also, please specify if you made any changes to UniDAC Source Code.

Posted: Tue 13 Mar 2012 13:52
by samin
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;

Posted: Wed 14 Mar 2012 09:03
by AndreyZ
We cannot reproduce this problem using the code you provided. Please try creating a small sample to demonstrate the problem and send it to andreyz*devart*com .