Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Some Help Deciphering...

Status
Not open for further replies.

tjc240e

Technical User
Nov 12, 2004
133
US
I have been given this code which is currently in use in a part of our program. The programmer who developed this is no longer with us and this code does not seem to be working anymore. Im assuming that this is a DynaSet setup?

Anyone give me pointers on this?

Code:
    with AttendData do
    begin
      // for all options
      if TCBInd2.IsOpen then
        TCBInd2.Close;
      TCBInd2.FileNameOverride := CBDataBaseU.DataPath+'CSATTEND.UDB';
      TCBInd2.FileAlias := 'CSATTEND';
      TCBInd2.FileExt := 'UDB';
      TCBInd2.Children.Clear;
      NewChild := TCBInd2.Children.Add; // add First Child[0]
      with NewChild do
      begin
        FileAlias := 'CSREFTBL';
        FileExt := 'UDB';
        FileNameOverride := CBDataBaseU.DataPath+'CSREFTBL.UDB';
        RelationType := rtExact;
        FieldPrefix := 'Lookup->';
        ErrorAction := eaSkip;
        TagName := 'TBL_ID';
        MasterExpr := 'Class_ID';
      end; // with NewChild 0
      // end -- for all options

      if NOT RBPrintAllAttended.Checked then
      begin
        if GGroupID <> 'All Records' then // choose a group file
...
        else
        begin // if GGroupID = 'All Records'
          NewChild := TCBInd2.Children.Add; // Add default Table child 1
          with NewChild do
          begin
            FileAlias := 'CSIND';
            FileExt := 'UDB';
            FileNameOverride := CBDataBaseU.DataPath+'CSIND.UDB';
            RelationType := rtExact;
            FieldPrefix := 'Ind->';
            ErrorAction := eaSkip;
            TagName := 'IND_ID';
            MasterExpr := 'IND_ID';
          end;
        end; // if GGroupID = 'All Records'
      end; // if NOT RBPrintAllAttended.Checked

      TCBInd2.SortExpr := 'ATTD_TYPE+Lookup->DESC';
      if TQEvent <> '' then
        TQuery := TQuery + ' .and. ' + TQEvent;
      TCBInd2.QueryExpr := TQuery;

      ProcessingFrm := TProcessingFrm.Create(Application);
      ProcessingFrm.Show;
      Application.ProcessMessages;

      TCBInd2.Open;
      TCBInd2.GoTop;
      TotalRecords := 0;
 
it doesnt appear to be linking the three tables together anymore.

Also im wondering if there isnt a better way to do searches for information rather than using a dynaset?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top