ExecSQL Result

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MatthewB
Posts: 2
Joined: Mon 13 Jul 2020 19:36

ExecSQL Result

Post by MatthewB » Tue 14 Jul 2020 12:35

Using a TMyQuery to UPDATE a record, i need to verify that the ExecSQL successfully performed the update.
I.e. that it found the record and made the update or how many records it did update
some Result := ExecSQL (Boolean or Integer result)
thanks

davidmarcus
Posts: 50
Joined: Tue 25 Jan 2005 11:22
Location: Somerville, MA
Contact:

Re: ExecSQL Result

Post by davidmarcus » Tue 14 Jul 2020 16:01

If you use TMyCommand, there is a RowsAffected property.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: ExecSQL Result

Post by ViktorV » Wed 15 Jul 2020 07:02

As davidmarcus wrote correctly to solve the problem, you can use the TMyQuery.RowsAffected property: https://www.devart.com/mydac/docs/devar ... fected.htm

MatthewB
Posts: 2
Joined: Mon 13 Jul 2020 19:36

Re: ExecSQL Result

Post by MatthewB » Wed 15 Jul 2020 17:10

Thanks!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: ExecSQL Result

Post by ViktorV » Wed 22 Jul 2020 05:52

Thank you for the interest in our products.
Contact us if you have any questions about our products.

Post Reply