mysqldelphimydac

documentation, pointers on TMyTable.Open in MyDAC


I am learning Devart's mydac Data Access Components and I have few question I have not been able to resolve through online searches and the documentations. In the code examples, I see invocation of TMyTable.Open but I could not find the description in TMyTable class or its inheritance path. I would like to as if anyone can point me to the documentation of this method and whether it has any relationship to TDBGrid class.

Thanks in advance


Solution

  • TDataSet.Open is generally used to get a data cursor back from the database.

    In order to use a TDBGrid you need to connect it to the TDataSet (In your case a TMyTable) through a TDataSource.

    On the other hand TMyTable.Execute will only run your SQL code on the server and not retrieve any data (except for some info on the affected rows).

    You normally use Execute for INSERT, DELETE, UPDATE, etc and Open for SELECT statements.