Page 1 of 1

Myquery1.Open or MyQuery1.Execute

Posted: Sun 13 Mar 2016 14:42
by cybsistemas
What is the difference between Myquery1.Open and MyQuery1.Execute

Thanks.

Re: Myquery1.Open or MyQuery1.Execute

Posted: Mon 14 Mar 2016 12:17
by ViktorV
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.