From bdae3aabf5de4968bc0ea5a194e1d425607e0d2a Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 28 Feb 2013 20:11:26 +0000 Subject: [PATCH] Make use of property writer SetCreateCode, and display errors in SQL log when GetCreateCode failed. --- source/dbconnection.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 024762da..e5712201 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -4974,10 +4974,10 @@ end; function TDBObject.GetCreateCode: String; begin if not FCreateCodeFetched then try - FCreateCode := Connection.GetCreateCode(Database, Name, NodeType); - except + CreateCode := Connection.GetCreateCode(Database, Name, NodeType); + except on E:Exception do + Connection.Log(lcError, E.Message); end; - FCreateCodeFetched := True; Result := FCreateCode; end;