mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 02:50:42 +02:00
* Patch from Luiz Americo to remove redundant field check (is in BindFields) Bug ID #29296
git-svn-id: trunk@32807 -
This commit is contained in:
parent
3c73c99a18
commit
49fcad5119
@ -1249,15 +1249,17 @@ begin
|
|||||||
if Fields.Count = 0 then
|
if Fields.Count = 0 then
|
||||||
DatabaseError(SErrNoDataset);
|
DatabaseError(SErrNoDataset);
|
||||||
|
|
||||||
// If there is a field with FieldNo=0 then the fields are not found to the
|
// search for autoinc field
|
||||||
// FieldDefs which is a sign that there is no dataset created. (Calculated and
|
|
||||||
// lookup fields have FieldNo=-1)
|
|
||||||
FAutoIncField:=nil;
|
FAutoIncField:=nil;
|
||||||
for i := 0 to Fields.Count-1 do
|
if FAutoIncValue>-1 then
|
||||||
if Fields[i].FieldNo=0 then
|
begin
|
||||||
DatabaseError(SErrNoDataset)
|
for i := 0 to Fields.Count-1 do
|
||||||
else if (FAutoIncValue>-1) and (Fields[i] is TAutoIncField) and not assigned(FAutoIncField) then
|
if Fields[i] is TAutoIncField then
|
||||||
FAutoIncField := TAutoIncField(Fields[i]);
|
begin
|
||||||
|
FAutoIncField := TAutoIncField(Fields[i]);
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
InitDefaultIndexes;
|
InitDefaultIndexes;
|
||||||
CalcRecordSize;
|
CalcRecordSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user