Changeset 119


Ignore:
Timestamp:
Mar 23, 2007, 1:58:41 AM (14 years ago)
Author:
alloc
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • oup/current/DataAccess/Access_OUP_ADB.pas

    r116 r119  
    1919
    2020    function GetLinksToFile(FileID: Integer): TLinks;
    21     function GetLinksFromFile(FileID: Integer): TLinks;
    2221
    2322    function GetFileInfo(FileID: Integer): TFileInfo; override;
     
    187186      Result.ByID[i].SrcOffset := FQuery.FieldByName('src_link_offset').AsInteger;
    188187      Result.ByID[i].Destination := FQuery.FieldByName('src_id').AsInteger;
    189       Inc(i);
    190       FQuery.Next;
    191     until FQuery.EOF;
    192   end;
    193   FQuery.Close;
    194 end;
    195 
    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;
    210188      Inc(i);
    211189      FQuery.Next;
Note: See TracChangeset for help on using the changeset viewer.