[DUG]Scope

Conor Boyd Conor.Boyd at trimble.co.nz
Fri Feb 10 12:17:35 NZDT 2006


Your assumption is correct.

You'd be passing a reference to the ClientDataSet, not a copy.

Cheers,

C. 

-----Original Message-----
From: John Bird [mailto:johnkbird at paradise.net.nz] 

I was also thinking this (passing the dataset) is the cleanest way, I
hadn't tried it yet as I was uncertain how Delphi handles passing the
TClientDataSet object behind the scenes eg as a parameter to a procedure
in form2....as the dataset can be quite large.  I assume it passes a
reference to the dataset not the entire data...however as a relative
newbie to datasets I know assumptions can bite back....(for instance I
read up quite a lot on how strings are handled in Delphi before I got
too heavily into using
them)

Can someone kindly confirm the cleanest (=efficient and tidy) way to
pass the dataset to a procedure in another form if not as a parameter to
the procedure in the other unit.  Any in-depth references to how Delphi
handles these operations and best practices appreciated too - thanks.

-----Original Message-----
From: Conor Boyd [mailto:Conor.Boyd at trimble.co.nz]

Without seeing more of your code, I think you'd be better if your
general
printing routine gets passed a TClientDataSet object which it uses,
rather
than ferreting about in a form's innards. 



More information about the Delphi mailing list