فهرست منبع

* Add Port to SQLConnector

git-svn-id: trunk@48358 -
michael 4 سال پیش
والد
کامیت
25e2f29e01
1فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 8 2
      packages/fcl-db/src/sqldb/sqldb.pp

+ 8 - 2
packages/fcl-db/src/sqldb/sqldb.pp

@@ -802,6 +802,7 @@ type
     Property Proxy : TSQLConnection Read FProxy;
   Published
     Property ConnectorType : String Read FConnectorType Write SetConnectorType;
+    Property Port;
   end;
 
   TSQLConnectionClass = Class of TSQLConnection;
@@ -1197,8 +1198,12 @@ end;
 
 procedure TCustomSQLStatement.DeAllocateCursor;
 begin
-  if Assigned(FCursor) and Assigned(Database) then
-    DataBase.DeAllocateCursorHandle(FCursor);
+  if Assigned(FCursor) then
+     begin
+     if Assigned(Database) then
+       DataBase.DeAllocateCursorHandle(FCursor);
+     FreeAndNil(FCursor);
+     end;
 end;
 
 function TCustomSQLStatement.ExpandMacros( OrigSQL : String ) : String;
@@ -1515,6 +1520,7 @@ begin
     end;
   finally;
     DeAllocateCursorHandle(Cursor);
+    FreeAndNil(Cursor);
   end;
 end;