🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Forms &SLQ

#1201
From: Bowen Moursund
Date: Mon, 06 Apr 1998 00:00
71 lines
2549 bytes
>I am trying to create an application and am using the SQL to join two
>tables, then creating a form for data input. the only problem is that when
>you try and enter data into the form you get the message that is a read
>only form.

Joins of native tables frequently produce a readonly rowset. You can link a
set of native tables (.DBF and .DB) using the indexName, masterRowset, and
masterFields properties of the rowset objects of the tables' query objects.
Here follows an example of a datamodule comprised of three related tables
from Visual dBASE\Samples\Mugs\Tables:

** END HEADER -- do not remove this line
//
// Generated on 12/26/1997
//
class demoDataModule of DATAMODULE


   this.CUSTOMER1 = new QUERY()
   this.CUSTOMER1.parent = this
   with (this.CUSTOMER1)
      left = 1.4286
      top = 0.3182
      sql = 'select * from "Customer.dbf"'
      active = true
   endwith

   with (this.CUSTOMER1.rowset)
      indexName = "LAST NAME"
   endwith

   this.INVOICE1 = new QUERY()
   this.INVOICE1.parent = this
   with (this.INVOICE1)
      left = 6.2857
      top = 1.8182
      sql = 'select * from "Invoice.dbf"'
      active = true
   endwith

   with (this.INVOICE1.rowset)
      indexName = "CUSTOMER ID"
      masterRowset = parent.parent.customer1.rowset
      masterFields = "Customer ID"
   endwith

   this.LINEITEM1 = new QUERY()
   this.LINEITEM1.parent = this
   with (this.LINEITEM1)
      left = 11.2857
      top = 3.3182
      sql = 'select * from "Lineitem.dbf"'
      active = true
   endwith

   with (this.LINEITEM1.rowset)
      indexName = "INVOICE ID"
      masterRowset = parent.parent.invoice1.rowset
      masterFields = "Invoice ID"
   endwith

   this.rowset = this.customer1.rowset
endclass
__
Bowen Moursund (TeamB)
bowenNOSPAM@nerds.com
http://www.mindspring.com/~bowenm/datatech.htm
Try these help resources:
http://forumsearch.borland.com:88
http://www.dejanews.com/home_ps.shtml
Technical Details
Message-ID: <6gbcmu$l5o5@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bd616a$de2a8c80$0601010a@ETGATE>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,a9b51b068da054f9
X-Google-Attributes: gidff5a1,public
From: "Bowen Moursund" <teamb@opto-pps.com>
Subject: Re: Forms &SLQ
Date: 1998/04/06
Message-ID: <6gbcmu$l5o5@forums.borland.com>
X-Deja-AN: 341456075
Content-Transfer-Encoding: 7bit
References: <01bd616a$de2a8c80$0601010a@ETGATE>
Content-Type: text/plain; charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: DataTech
Mime-Version: 1.0
Newsgroups: borland.public.vdbase.data.sql