| 18 | 
   | 
     procedure UpdateListCache; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 19 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 20 | 
   | 
     function GetLinksToFile(FileID: Integer): TLinks; | 
 
 
 
 
 
 
 
 
 
 | 21 | 
 – | 
     function GetLinksFromFile(FileID: Integer): TLinks; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 21 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 22 | 
   | 
     function GetFileInfo(FileID: Integer): TFileInfo; override; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 23 | 
   | 
     function GetFilesList(Ext: String; Pattern: String; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 66 | 
   | 
   FFileName := DBFilename; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 67 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 68 | 
   | 
   FDatabase := TABSDatabase.Create(nil); | 
 
 
 
 
 
 
 
 
 | 69 | 
 + | 
   FDatabase.Exclusive := True; | 
 
 
 
 
 
 
 
 
 | 70 | 
 + | 
   FDatabase.MultiUser := False; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 71 | 
   | 
   FDatabase.DatabaseName := 'OLDBcon' + IntToStr(ConnectionID); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 72 | 
   | 
   FDatabase.DatabaseFileName := DBFilename; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 73 | 
   | 
   FDatabase.Open; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 74 | 
   | 
   FQuery := TABSQuery.Create(FDatabase); | 
 
 
 
 
 
 
 
 
 | 75 | 
 + | 
   FQuery.DisableControls; | 
 
 
 
 
 
 
 
 
 | 76 | 
 + | 
   FQuery.RequestLive := False; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 77 | 
   | 
   FQuery.DatabaseName := 'OLDBcon' + IntToStr(ConnectionID); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 78 | 
   | 
   FQuery.SQL.Text := 'SELECT [name],[value] FROM globals ORDER BY [name] ASC'; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 79 | 
   | 
   FQuery.Open; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 196 | 
   | 
   FQuery.Close; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 197 | 
   | 
 end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 198 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 | 196 | 
 – | 
 function TAccess_OUP_ADB.GetLinksFromFile(FileID: Integer): TLinks; | 
 
 
 
 
 
 
 
 
 
 | 197 | 
 – | 
 var | 
 
 
 
 
 
 
 
 
 
 | 198 | 
 – | 
   i: Integer; | 
 
 
 
 
 
 
 
 
 
 | 199 | 
 – | 
 begin | 
 
 
 
 
 
 
 
 
 
 | 200 | 
 – | 
   SetLength(Result.ByName, 0); | 
 
 
 
 
 
 
 
 
 
 | 201 | 
 – | 
   FQuery.SQL.Text := 'SELECT src_link_offset, target_id FROM linkmap WHERE src_id = ' + IntToStr(FileID) + ' ORDER BY target_id ASC;'; | 
 
 
 
 
 
 
 
 
 
 | 202 | 
 – | 
   FQuery.Open; | 
 
 
 
 
 
 
 
 
 
 | 203 | 
 – | 
   SetLength(Result.ByID, FQuery.RecordCount); | 
 
 
 
 
 
 
 
 
 
 | 204 | 
 – | 
   if FQuery.RecordCount > 0 then | 
 
 
 
 
 
 
 
 
 
 | 205 | 
 – | 
   begin | 
 
 
 
 
 
 
 
 
 
 | 206 | 
 – | 
     i := 0; | 
 
 
 
 
 
 
 
 
 
 | 207 | 
 – | 
     repeat | 
 
 
 
 
 
 
 
 
 
 | 208 | 
 – | 
       Result.ByID[i].SrcOffset := FQuery.FieldByName('src_link_offset').AsInteger; | 
 
 
 
 
 
 
 
 
 
 | 209 | 
 – | 
       Result.ByID[i].Destination := FQuery.FieldByName('target_id').AsInteger; | 
 
 
 
 
 
 
 
 
 
 | 210 | 
 – | 
       Inc(i); | 
 
 
 
 
 
 
 
 
 
 | 211 | 
 – | 
       FQuery.Next; | 
 
 
 
 
 
 
 
 
 
 | 212 | 
 – | 
     until FQuery.EOF; | 
 
 
 
 
 
 
 
 
 
 | 213 | 
 – | 
   end; | 
 
 
 
 
 
 
 
 
 
 | 214 | 
 – | 
   FQuery.Close; | 
 
 
 
 
 
 
 
 
 
 | 215 | 
 – | 
 end; | 
 
 
 
 
 
 
 
 
 
 | 216 | 
 – | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 199 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 200 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 201 | 
   | 
 function TAccess_OUP_ADB.GetFileInfo(fileid: Integer): TFileInfo; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 253 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 254 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 255 | 
   | 
   list := TStringList.Create; | 
 
 
 
 
 
 
 
 
 | 256 | 
 + | 
   list.CaseSensitive := True; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 257 | 
   | 
   list.Sorted := True; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 258 | 
   | 
   for i := 0 to GetFileCount - 1 do | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 259 | 
   | 
   begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 271 | 
   | 
           ST_IDAsc, ST_IDDesc:     list.Add(id + ';' + name + ';' + extension); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 272 | 
   | 
           ST_NameAsc, ST_NameDesc: list.Add(name + ';' + id + ';' + extension); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 273 | 
   | 
           ST_ExtAsc, ST_ExtDesc:   list.Add(extension + ';' + id + ';' + name); | 
 
 
 
 
 
 
 
 
 
 
 
 | 274 | 
 < | 
           ST_ExtNameAsc, ST_ExtNameDesc: list.Add(name + ';' + extension + ';' + id); | 
 
 
 
 
 
 
 
 
 
 | 274 | 
 > | 
           ST_ExtNameAsc, ST_ExtNameDesc: list.Add(extension + ';' + name + ';' + id); | 
 
 
 
 
 
 
 
 
 
 
 
 | 275 | 
   | 
         end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 276 | 
   | 
       end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 277 | 
   | 
     end; |