🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #1084

Re: VDB7 - DMD Question

#1084
From: Bowen Moursund
Date: Tue, 28 Apr 1998 00:00
73 lines
2630 bytes
>I tried reversing the master detail
>relationship but that only returns the first record.

Here follows another untested solution, if you care to try it out:

class PROCSDataModule of DATAMODULE

   this.PROCS1 = new QUERY()
   this.PROCS1.parent = this
   with (this.PROCS1)
      left = 10.4286
      top = 0.4091
      sql = 'select * from "PROCS.DBF"'
      active = true
   endwith

   with (this.PROCS1.rowset)
      canGetRow = class::PROCS_CANGETROW

   endwith

   this.CLAIMS1 = new QUERY()
   this.CLAIMS1.parent = this
   with (this.CLAIMS1)
      left = 2.8571
      top = 0.5909
      sql = 'select * from "claims.dbf"'
      active = true
   endwith

   with (this.CLAIMS1.rowset)

      indexName = "CLAIMNO"
      masterRowset = parent.parent.procs1.rowset
      masterFields = "CLAIMNO"
   endwith

   this.CLAIMS2 = new QUERY()
   this.CLAIMS2.parent = this
   with (this.CLAIMS2)
      left = 2.8571
      top = 0.5909
      sql = 'select * from "claims.dbf"'
      active = true
   endwith


   with (this.CLAIMS2.rowset)

      indexName = "CLAIMNO"
   endwith

   this.rowset = this.procs1.rowset

   function Procs_canGetRow
      local bCanGetRow, oRS
      oRS = this.parent.parent.claims2.rowset
      oRS.findKey(this.fields["CLAIMNO"].value)
      bCanGetRow = not oRS.fields["CLOSED"].value 
      if bCangetRow
         bCanGetRow = this.fields["TOS"].value = 'X'
      endif
      return bCanGetRow

endclass
__
Bowen Moursund (TeamB)
bowenNOSPAM@nerds.com
http://lonestar.texas.net/~moursund/
Try these help resources:
http://forumsearch.borland.com:88
http://www.dejanews.com/home_ps.shtml
Technical Details
Message-ID: <6i59h9$b8a6@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <353D1963.4C0D@Bellsouth.net> <6hivn8$mc49@forums.borland.com> <353D5D1A.3682@Bellsouth.net> <6hl6j9$okg7@forums.borland.com> <353E7483.513D@Bellsouth.net> <6hnq54$r4g9@forums.borland.com> <353FDCA1.6480@Bellsouth.net> <6hqfn8$lk5@forums.borland.com> <35416057.4FCA@Bellsouth.net> <6i01de$55210@forums.borland.com> <3544073C.742B@Bellsouth.net> <6i2qso$8jr11@forums.borland.com> <35458149.4F0D@Bellsouth.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,438323d64b0ab196
X-Google-Attributes: gidff5a1,public
From: "Bowen Moursund" <teamb@opto-pps.com>
Subject: Re: VDB7 - DMD Question
Date: 1998/04/28
Message-ID: <6i59h9$b8a6@forums.borland.com>
X-Deja-AN: 348503659
Content-Transfer-Encoding: 7bit
References: <353D1963.4C0D@Bellsouth.net> <6hivn8$mc49@forums.borland.com> <353D5D1A.3682@Bellsouth.net> <6hl6j9$okg7@forums.borland.com> <353E7483.513D@Bellsouth.net> <6hnq54$r4g9@forums.borland.com> <353FDCA1.6480@Bellsouth.net> <6hqfn8$lk5@forums.borland.com> <35416057.4FCA@Bellsouth.net> <6i01de$55210@forums.borland.com> <3544073C.742B@Bellsouth.net> <6i2qso$8jr11@forums.borland.com> <35458149.4F0D@Bellsouth.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: DataTech
Newsgroups: borland.public.vdbase.data.sql