[DUG] Run Function called from a database field's data.

Neven MacEwan neven at mwk.co.nz
Fri Mar 5 06:50:50 NZDT 2010


Wallace

What database are you using?, Do you need to call this function at a db 
level or are you iterating thru the dataset?
In the simplist method just wrap a Case statement arrount the function 
name if you want to get more complex you should
do some research on RTTI (Refelection for Delphi) so you bind to methods 
in a 'function object'

HTH
Neven
> I have 9 function routines that are used by several forms.
>
> I have a database with 9 records that has specific data for each 
> function.
>
> If I select record 4 for example, how do I run a function where it's 
> name is within the database field called FUNC.
>
> tbl.Oper.feildbyname['Func'].AsString has 'Circle' or 'Square' as its 
> data
>
> Now I need to run a function like Circle(Data) or Square(Data) when 
> selecting the relevant record.
>  
> 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