tobenschain 0 Posted June 27 Can't figure out why BudSys_DB.Indexes.Count is zero BudSys_Con := TFDConnection.Create(nil); with BudSys_Con do begin Params.DriverId := 'SQLite'; Params.Database := sys_dir^+'BudSysDB'+'.sdb'; ExecSQL('PRAGMA locking_mode = NORMAL'); ExecSQL('PRAGMA journal_mode = OFF'); Open; end; if BudSys_DB=nil then begin BudSys_DB := TFDTable.Create(nil); BudSys_DB.TableName := 'BudSysDB'; BudSys_DB.IndexFieldNames := 'key'; BudSys_DB.Connection := BudSys_Con; BudSys_DB.Open; end; Share this post Link to post
corneliusdavid 214 Posted June 27 26 minutes ago, tobenschain said: Can't figure out why BudSys_DB.Indexes.Count is zero From the Delphi Help file on TSQLTable.IndexFieldNames... Quote IndexFieldNames is also used to link this table as the detail in a master/detail relationship. Each of these fields must be matched to a corresponding field from the MasterFields property. Instead of explicitly setting the sorting and linking fields using IndexFieldNames, you can indicate them using an existing index. To specify the sorting and linking fields implicitly through an index, use the IndexName property instead. Note: The IndexName and IndexFieldNames properties are mutually exclusive. Setting one automatically clears the other. Share this post Link to post
tobenschain 0 Posted June 27 Can't figure out why I can process Module Data but not BudSys, BudSys works after I create it but not after I exit BudGen. Share this post Link to post