Myquery1.Open or MyQuery1.Execute

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cybsistemas
Posts: 118
Joined: Mon 12 Sep 2005 17:31
Location: Argentina

Myquery1.Open or MyQuery1.Execute

Post by cybsistemas » Sun 13 Mar 2016 14:42

What is the difference between Myquery1.Open and MyQuery1.Execute

Thanks.

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

Re: Myquery1.Open or MyQuery1.Execute

Post by ViktorV » Mon 14 Mar 2016 12:17

The TMyQuery.Open method is designed for execution of an SQL statements that returns recordset. Otherwise, call to this method will return an error. TMyQuery.Execute is designed to execute any SQL statement on the server. If the executing SQL statement returns recordset, TMyQuery.Execute will open it.

Post Reply