[DUG] Editing date from two tables

Alister Christie alister at salespartner.co.nz
Mon Dec 7 15:44:55 NZDT 2009


Probably put the TDataSource on the form, with all your controls using 
the TDataSource - which you can swap between tblJobByCustomer and 
tblJobByDay.  I'm fairly sure you can have multiple TDataSources 
attached to a TDataSet with no problems.

If you are wanting to point at the same data you might want to take a 
look at the CloneCursor method on TClientDataSet for sharing data in 
memory between two TClientDataSets.

Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington 



Marshland Engineering wrote:
> I have a table called tblJob.
>
> I have two dbgrids displaying the data from tblJobs, tblJobByCustomer 
> and tblJobByDay.
>
> I have an editing Form for changing the data using dbEditBox's.
>  
> How can I use the same Form for editing both tables ? It's like I need 
> to set the form property to the relevant DataSource rather than each 
> dbEditBox,
>  
> and how do I find the data record in tblJobByDay when looking at 
> tblJobByCustomer. They are actually the same data as stored in tblJob
>
>
> Thanks Wallace.
> ------------------------------------------------------------------------
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe


More information about the Delphi mailing list