Make use of property writer SetCreateCode, and display errors in SQL log when GetCreateCode failed.

This commit is contained in:
Ansgar Becker
2013-02-28 20:11:26 +00:00
parent 9abb84b38b
commit bdae3aabf5

View File

@ -4974,10 +4974,10 @@ end;
function TDBObject.GetCreateCode: String; function TDBObject.GetCreateCode: String;
begin begin
if not FCreateCodeFetched then try if not FCreateCodeFetched then try
FCreateCode := Connection.GetCreateCode(Database, Name, NodeType); CreateCode := Connection.GetCreateCode(Database, Name, NodeType);
except except on E:Exception do
Connection.Log(lcError, E.Message);
end; end;
FCreateCodeFetched := True;
Result := FCreateCode; Result := FCreateCode;
end; end;