617 |
|
end; |
618 |
|
|
619 |
|
{Firebird 3 introduces IDENTITY columns. We need to check for them here} |
620 |
< |
if qryTables.HasField('RDB$GENERATOR_NAME') then |
620 |
> |
if qryTables.HasField('RDB$GENERATOR_NAME') and not qryTables.FieldByName('RDB$GENERATOR_NAME').IsNull then |
621 |
|
begin |
622 |
|
qryGenerators.ParamByName('GENERATOR').AsString := qryTables.FieldByName('RDB$GENERATOR_NAME').AsString; |
623 |
|
qryGenerators.ExecQuery; |
2614 |
|
|
2615 |
|
procedure TIBExtract.SetDatabase(const Value: TIBDatabase); |
2616 |
|
begin |
2617 |
< |
if FDatabase <> Value then |
2617 |
> |
if (csLoading in ComponentState) or (FDatabase <> Value) then |
2618 |
|
begin |
2619 |
|
FDatabase := Value; |
2620 |
|
if (not Assigned(FTransaction)) and (FDatabase <> nil) then |
3241 |
|
Database := FDatabase; |
3242 |
|
SQL.Text := TableSQL; |
3243 |
|
ExecQuery; |
3244 |
+ |
FMetaData.Add('/* Data Starts */'); |
3245 |
|
while not EOF do |
3246 |
|
begin |
3247 |
|
ListData(Trim(FieldByName('RDB$RELATION_NAME').AsString)); |
3248 |
|
Next; |
3249 |
|
end; |
3250 |
+ |
FMetaData.Add('/* Data Ends */'); |
3251 |
|
finally |
3252 |
|
Free; |
3253 |
|
end; |
3274 |
|
with TIBInsertStmtsOut.Create(self) do |
3275 |
|
try |
3276 |
|
Database := FDatabase; |
3277 |
< |
DataOut(Format('Select %s From %s',[FieldList,QuoteIdentifier(FDatabase.SQLDialect, ObjectName)]), |
3278 |
< |
Add2MetaData); |
3279 |
< |
FMetaData.Add('COMMIT;'); |
3277 |
> |
if DataOut(Format('Select %s From %s',[FieldList,QuoteIdentifier(FDatabase.SQLDialect, ObjectName)]), |
3278 |
> |
Add2MetaData) then |
3279 |
> |
FMetaData.Add('COMMIT;'); |
3280 |
|
finally |
3281 |
|
Free |
3282 |
|
end; |