[DUG] Component names

Mark Howard mhoward at pslog.co.nz
Thu Aug 25 14:33:41 NZST 2005


Sorry Traci

Didn't make myself clear

I want to test if a TTable with the same name as the parameter TDataset is active.
If it is not I want to Open the TTable that has the same name as TDataset.

Mark

On Thu, 25 Aug 2005 14:18:52 +1200, Traci Sumpter <Traci.Sumpter at opus.co.nz> wrote:

> If MyDataset.State <> dsActive then MyDataset.Datasource.Open ;
>
> Or try
>
> If MyDataset.State <> dsActive then MyDataset.Open ; // not sure if this
> does the job also
>
>
> -----Original Message-----
> From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
> Behalf Of Mark Howard
> Sent: Thursday, 25 August 2005 2:09 p.m.
> To: delphi at ns3.123.co.nz
> Subject: [DUG] Component names
>
> Hi
>
> Newbie (still!) question
>
> I have a procedure that is passed a parameter MyDataset : TDataset
>
> Within the procedure I want to do
>
> if not MyTable.Active then
> 	MyTable.Open;
>
> where MyTable.Name = MyDataset.Name
>
> Can someone please help me with the syntax, which eludes me?
>
> Thanks
>
> Mark
>
>
> --
> Forest Production Systems Ltd
> Creators of PSLog - A harvesting information system www.pslog.co.nz
> Skype: markhoward
>
>



-- 
Forest Production Systems Ltd
Creators of PSLog - A harvesting information system
www.pslog.co.nz
Skype: markhoward


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.15/80 - Release Date: 23/08/2005



More information about the Delphi mailing list