|
@@ -850,6 +850,7 @@ begin
|
|
(Database as tsqlconnection).AddFieldDefs(fcursor,FieldDefs);
|
|
(Database as tsqlconnection).AddFieldDefs(fcursor,FieldDefs);
|
|
finally
|
|
finally
|
|
FLoadingFieldDefs := False;
|
|
FLoadingFieldDefs := False;
|
|
|
|
+ FCursor.FInitFieldDef := false;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1018,6 +1019,8 @@ begin
|
|
if FCursor.FStatementType in [stSelect] then
|
|
if FCursor.FStatementType in [stSelect] then
|
|
begin
|
|
begin
|
|
Execute;
|
|
Execute;
|
|
|
|
+ // InternalInitFieldDef is only called after a prepare. i.e. not twice if
|
|
|
|
+ // a dataset is opened - closed - opened.
|
|
if FCursor.FInitFieldDef then InternalInitFieldDefs;
|
|
if FCursor.FInitFieldDef then InternalInitFieldDefs;
|
|
if DefaultFields then
|
|
if DefaultFields then
|
|
begin
|
|
begin
|
|
@@ -1041,7 +1044,9 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
- end;
|
|
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ BindFields(True);
|
|
if FUpdateable then
|
|
if FUpdateable then
|
|
begin
|
|
begin
|
|
InitialiseModifyQuery(FDeleteQry,FDeleteSQL);
|
|
InitialiseModifyQuery(FDeleteQry,FDeleteSQL);
|