Recent

Author Topic: [CLOSED] InverseReferenceCheck  (Read 536 times)

julkas

  • Guest
[CLOSED] InverseReferenceCheck
« on: November 02, 2019, 02:15:29 pm »
In the old Delphi 6 code I found -
Code: Pascal  [Select][+][-]
  1. session.InverseReferenceCheck := False;
What does it mean?
« Last Edit: November 02, 2019, 06:06:28 pm by julkas »

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8795
  • FPC developer.
Re: InverseReferenceCheck
« Reply #1 on: November 02, 2019, 02:17:35 pm »
That would depend on the type of "session" of course.

Please try to provide somewhat more detail with your questions.

julkas

  • Guest
Re: InverseReferenceCheck
« Reply #2 on: November 02, 2019, 02:23:23 pm »
That would depend on the type of "session" of course.
Please try to provide somewhat more detail with your questions.
Code: Pascal  [Select][+][-]
  1. var
  2.   session : TFastDbSession;
  3.  
Code: Pascal  [Select][+][-]
  1. type
  2.   TFastDbSession = class(TComponent)
  3.  

Code: Pascal  [Select][+][-]
  1.   TFastDbSession = class(TComponent)
  2.   private
  3.     FLastErrorCode         : Integer;
  4.     FRollbackOnDisconnect  : Boolean;
  5.     FUsername              : string;
  6.     FPassword              : string;
  7.     FDatabase              : string;
  8.     FDatabasePath          : string;
  9.     FHost                  : string;
  10.     FPort                  : Integer;
  11.     FMaxConnectRetries     : Integer;
  12.     FReconnectTimeout      : Integer;
  13.     FInitDatabaseSize      : Integer;
  14.     FInitIndexSize         : Integer;
  15.     FExtensionQuantum      : Integer;
  16.     FFileSizeLimit         : Integer;
  17.     FAutoCommit            : Boolean;
  18.     FOnChange              : TDbSessionEvent;
  19.     FBeforeLogOn           : TDbSessionEvent;
  20.     FAfterLogOn            : TDbSessionEvent;
  21.     FHandle                : Integer;
  22.     FThreadID              : DWord;
  23.     FThreaded              : Boolean;
  24.     FContextList           : TThreadList;
  25.     FReplicationSupport    : Boolean;
  26.     FNodeID                : Integer;
  27.     FNodeNames             : TStrArray;
  28.     FOpenAttributes        : TCliOpenAttributes;
  29.     FTransactionCommitDelay: Integer;
  30.     FTraceHandlerThunk     : TProcedureOfObjectThunk;
  31.     FAssignedErrorHandler  : Boolean;
  32.     FOldErrorHandler       : TCliErrorHandler;
  33.     FOnSessionError        : TDbErrorHandler;
  34.     FOnTraceEvent          : TDbTraceEvent;
  35.     procedure CheckHandle;
  36.     procedure SessionTraceHandler(Msg: PChar); cdecl;
  37.     procedure SetConnected(const Value: Boolean);
  38.     procedure SetLogonUsername(const Value: string);
  39.     procedure SetLogonPassword(const Value: string);
  40.     procedure SetDatabase(const Value: string);
  41.     procedure SetPort(const Value: Integer);
  42.     procedure SetAutoCommit(const Value: Boolean);
  43.     function  GetConnected: Boolean;
  44.     procedure SetDatabasePath(const Value: string);
  45.     procedure SetHost(const Value: string);
  46.     procedure SetTransactionCommitDelay(const Value: Integer);
  47.     procedure SetMaxConnectRetries(const Value: Integer);
  48.     procedure SetReconnectTimeout(const Value: Integer);
  49.     procedure SetInitDatabaseSize(const Value: Integer);
  50.     procedure InternalOpenDatabase(const AConnectLocal: Boolean);
  51.     procedure SetOnTraceEvent(const Value: TDbTraceEvent);
  52.   protected
  53.     procedure Loaded; override;
  54.     procedure DoBeforeLogon; virtual;
  55.     procedure DoAfterLogon; virtual;
  56.     function  DumpFields(const Fields: TFieldDescriptors; const LeftOffset: Integer=0): string;
  57.   public
  58.     constructor Create(AOwner: TComponent); override;
  59.     destructor  Destroy; override;
  60.     procedure OpenDatabase(
  61.                     const AServerHost: string='';
  62.                     const AServerPort: Integer=0;
  63.                     const AMaxConnectRetries: Integer=0;
  64.                     const AReconnectTimeout: Integer=FastDbDefReconnectTimeoutSec);
  65.     procedure CreateDatabase(
  66.                     const ADatabaseName: string='';
  67.                     const AFilePath: string='';
  68.                     const AInitDatabaseSize: Integer=FastDbDefaultInitDatabaseSize;
  69.                     const AOpenAttrs: TCliOpenAttributes=[oaReadWrite];
  70.                     const AInitIndexSize: Integer=FastDbDefaultInitIndexSize;
  71.                     const AExtensionQuantum: Integer=FastDbDefaultExtensionQuantum;
  72.                     const AFileSizeLimit: Integer=0;
  73.                     const ATransactionCommitDelay: Word=0);
  74.     procedure CreateReplicatedDatabase(
  75.                     const ANodeID: Integer;
  76.                     const ANodeNames: TStrArray;
  77.                     const ADatabaseName: string='';
  78.                     const AFilePath: string='';
  79.                     const AInitDatabaseSize: Integer=FastDbDefaultInitDatabaseSize;
  80.                     const AOpenAttrs: TCliOpenAttributes=[oaReadWrite];
  81.                     const AInitIndexSize: Integer=FastDbDefaultInitIndexSize;
  82.                     const AExtensionQuantum: Integer=FastDbDefaultExtensionQuantum;
  83.                     const AFileSizeLimit: Integer=0);
  84.     procedure CloseDatabase(const RaiseError: Boolean=True);
  85.     procedure Commit(const Flush: Boolean);
  86.     procedure Rollback;
  87.     procedure ListTables(List: TStringList);
  88.     function  TableExists(const Table: string): Boolean;
  89.     function  DescribeTable(const Table: string; var Fields: TFieldDescriptors; RaiseError: Boolean=True): Integer; overload; // returns field count
  90.     function  DescribeTable(const Table: string; Fields: TFastDbFields; RaiseError: Boolean=True) : Integer; overload; // returns field count
  91.     function  CreateTable(const Table: string; var Fields: TFieldDescriptors; RefCheck: Boolean=False)  : Boolean; overload;
  92.     function  CreateTable(const Table: string; const Fields: TFastDbFields; RefCheck: Boolean=False)          : Boolean; overload;
  93.     procedure DropTable(Table: string);
  94.     procedure AlterIndex(const Table, Field: string; const NewFlags: TIndexTypes=[]);
  95.     function  AlterTable(const Table: string; var Fields: TFieldDescriptors)  : Boolean; overload;
  96.     function  AlterTable(const Table: string; const Fields: TFastDbFields)    : Boolean; overload;
  97.     function  ExtractTableDDL(const TableName: string): string;
  98.     procedure SaveDDLtoFile(FileName: string);
  99.     function  GetDatabaseState: TCliDatabaseMonitor;  // Obtain database status record
  100.     property  Handle: Integer  read FHandle;
  101.     property  ThreadID: DWord  read FThreadID;   // thread which opened the database
  102.     function  CliCheck(const Code: Integer; Msg: string=''; const RaiseError: Boolean=True): Integer;
  103.     function  ErrorMessage(ErrorCode: Integer): string;
  104.     function  ServerVersion: string;
  105.     // Threading support
  106.     procedure Attach;
  107.     procedure Detach(ADetachMode: TDetachModes=[dtPreCommit, dtDestroyContext]);
  108.     {$IFDEF GIGABASE}
  109.     procedure ClearConnectionPool;    // Close all released connection in connection pool
  110.     {$ENDIF}
  111.     // Replication support properties
  112.     property  ReplicationSupport: Boolean read FReplicationSupport;
  113.     property  NodeID: Integer read FNodeID;
  114.   published
  115.     property OnChange   : TDbSessionEvent        read FOnChange          write FOnChange;
  116.     property OnSessionError: TDbErrorHandler     read FOnSessionError    write FOnSessionError;
  117.     property OnTraceEvent: TDbTraceEvent         read FOnTraceEvent      write SetOnTraceEvent;
  118.     property BeforeLogOn: TDbSessionEvent        read FBeforeLogOn       write FBeforeLogOn;
  119.     property AfterLogOn : TDbSessionEvent        read FAfterLogOn        write FAfterLogOn;
  120.     property LogonUsername: string               read FUsername          write SetLogonUsername;
  121.     property LogonPassword: string               read FPassword          write SetLogonPassword;
  122.     property Database: string                    read FDatabase          write SetDatabase;
  123.     property Host: string                        read FHost              write SetHost;
  124.     property Port: Integer                       read FPort              write SetPort;
  125.     property DatabasePath: string                read FDatabasePath      write SetDatabasePath;
  126.     property MaxConnectRetries: Integer          read FMaxConnectRetries write SetMaxConnectRetries;
  127.     property ReconnectTimeout: Integer           read FReconnectTimeout  write SetReconnectTimeout;
  128.     property InitDatabaseSize: Integer           read FInitDatabaseSize  write SetInitDatabaseSize;
  129.     property InitIndexSize: Integer              read FInitIndexSize     write FInitIndexSize;
  130.     property ExtensionQuantum: Integer           read FExtensionQuantum  write FExtensionQuantum;
  131.     property FileSizeLimit: Integer              read FFileSizeLimit     write FFileSizeLimit;
  132.     property TransactionCommitDelay: Integer     read FTransactionCommitDelay write SetTransactionCommitDelay;
  133.     property OpenAttributes: TCliOpenAttributes  read FOpenAttributes    write FOpenAttributes;
  134.     property Connected: Boolean                  read GetConnected       write SetConnected;
  135.     property RollbackOnDisconnect: Boolean       read FRollbackOnDisconnect write FRollbackOnDisconnect;
  136.     property AutoCommit: Boolean                 read FAutoCommit        write SetAutoCommit Stored False;
  137.     property LastErrorCode: Integer              read FLastErrorCode     write FLastErrorCode;
  138.     property Threaded: Boolean                   read FThreaded          write FThreaded;
  139.   end;
  140.  
« Last Edit: November 02, 2019, 02:37:54 pm by julkas »

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8795
  • FPC developer.
Re: InverseReferenceCheck
« Reply #3 on: November 02, 2019, 02:34:44 pm »
A search for "Inversereferencecheck delphi" yields no results, and a grep in my delphi sources dir yields no result either.

If I search for fastdb, I do find this: http://www.garret.ru/fastdb.html, but there are many differing archives there.

I suggest you debug the issue.

julkas

  • Guest
Re: InverseReferenceCheck
« Reply #4 on: November 02, 2019, 02:52:01 pm »
A search for "Inversereferencecheck delphi" yields no results, and a grep in my delphi sources dir yields no result either.
Me too. So I asked question.

Thaddy

  • Hero Member
  • *****
  • Posts: 10516
Re: InverseReferenceCheck
« Reply #5 on: November 02, 2019, 04:19:31 pm »
I also grepped the D5/6/7 rtl/vcl sources: noone found.
Third-party code?

julkas

  • Guest
Re: InverseReferenceCheck
« Reply #6 on: November 02, 2019, 05:23:22 pm »
I also grepped the D5/6/7 rtl/vcl sources: noone found.
Third-party code?
I don't know @Serge (code creator) (I know code origin), but examining source I think it's Delphi 6/7 property.
Compiling might clear.
« Last Edit: November 02, 2019, 05:44:12 pm by julkas »

Thaddy

  • Hero Member
  • *****
  • Posts: 10516
Re: InverseReferenceCheck
« Reply #7 on: November 02, 2019, 06:02:34 pm »
TFastDbSession is not a standard VCL class. That's third party code. I own D6 (and many more versions) with full rtl/vcl sourcecode.

Note you can also deduce that from its name......Delphi engineers would never write "fast" because it would mean another version was lacking in speed.
« Last Edit: November 02, 2019, 06:05:37 pm by Thaddy »

julkas

  • Guest
Re: InverseReferenceCheck
« Reply #8 on: November 02, 2019, 06:05:22 pm »
Thanks for replies.  I found  (may be) the answer.
« Last Edit: November 02, 2019, 06:16:19 pm by julkas »

 

TinyPortal © 2005-2018