ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/current/DataAccess/Access_OUP_ADB.pas
(Generate patch)

Comparing oup/current/DataAccess/Access_OUP_ADB.pas (file contents):
Revision 116 by alloc, Mon Feb 26 22:57:02 2007 UTC vs.
Revision 119 by alloc, Fri Mar 23 00:58:41 2007 UTC

# Line 18 | Line 18 | type
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;
# Line 189 | Line 188 | begin
188        Inc(i);
189        FQuery.Next;
190      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;
210      Inc(i);
211      FQuery.Next;
212    until FQuery.EOF;
191    end;
192    FQuery.Close;
193   end;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)