views:

60

answers:

2

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

A: 

In my case, a F1 keystroke while the caret is over a SQLQuery1.Open; brings the help in the DB.TDataSet.Open article, which in turn gave me a (broken) link to the current DocWiki Page. Far from perfect, but good enough to get basic information.

http://docwiki.embarcadero.com/VCL/en/DB.TDataSet.Open

jachguate
Thanks, that pointed me in the right direction
NicM
A: 

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.

Jens Mühlenhoff