Sandeep wrote: > > > This is better > > > > > > if Assigned (Datasource.DataSet.Connection) > > > then Result := Datasource.DataSet.Connection; > > > > > > if Datasource.Dataset is nil won't this raise > > an exception? > > Conditon evaluates to false in that case
In Delphi 5, you get an access violation since Assigned only tests the final deref not the early one. Maybe it's changed in Delphi 6. TTFN, Paul. --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/