Not too sure what you are asking but I will give it a go anyway.

if (MyTable.Name = MyDataset.Name) and (not MyTable.Active) then begin
        MyTable.Open;
end; 

Note: It is standard to prefix parameters with "P" (stands for
parameter) or "A" (stands for argument) so you should have PMyTable or
PTable.
Similarly Local variables are usually prefixed with "L". In the end it
makes it easy for figure out whene a variable comes from. "P" is a
parameter. "L" is a local variable and anything else is a property of
your class.

Stacey

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark Howard
> Sent: Thursday, 25 August 2005 14:09
> To: [email protected]
> 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
> 
> 
> -- 
> 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
> 
> _______________________________________________
> Delphi mailing list
> [email protected]
> http://ns3.123.co.nz/mailman/listinfo/delphi
> 

_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to