Functions With SQL

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
khh
Posts: 37
Joined: Wed 17 Nov 2004 17:10

Functions With SQL

Post by khh » Sun 08 Oct 2006 00:09

Can I use delphi function or custom function in SQL statement is TmyQuery?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 09 Oct 2006 10:30

It is impossible to use Delphi functions inside SQL statement. You can create your own function on the MySQL Server and then use it in SQL statements. Please see this topic of MySQL Server Reference Manual for details.

khh
Posts: 37
Joined: Wed 17 Nov 2004 17:10

Post by khh » Mon 09 Oct 2006 12:31

Is there any event (Before Post) that I can use to run functions against fields and manipulate it before be saved?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 09 Oct 2006 12:47

Yes, please see description of TDataSet class in Delphi Help.

Post Reply