简体   繁体   English

文档,TMyTable.Open上的指针在MyDAC中

[英]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. 我正在学习Devart的mydac数据访问组件,并且我有几个问题无法通过在线搜索和文档解决。 In the code examples, I see invocation of TMyTable.Open but I could not find the description in TMyTable class or its inheritance path. 在代码示例中,我看到了TMyTable.Open调用,但是在TMyTable类或其继承路径中找不到该描述。 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. 我想好像有人可以指出该方法的文档以及它是否与TDBGrid类有任何关系。

Thanks in advance 提前致谢

In my case, a F1 keystroke while the caret is over a SQLQuery1.Open; 在我的情况下,插入符在SQLQuery1.Open上时按F1键; brings the help in the DB.TDataSet.Open article, which in turn gave me a (broken) link to the current DocWiki Page. 在DB.TDataSet.Open文章中带来了帮助,这反过来又给了我一个到当前DocWiki页面的(断开)链接。 Far from perfect, but good enough to get basic information. 远非完美,但足以获取基本信息。

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

TDataSet.Open is generally used to get a data cursor back from the database. TDataSet.Open通常用于从数据库取回数据游标。

In order to use a TDBGrid you need to connect it to the TDataSet (In your case a TMyTable ) through a TDataSource . 为了使用TDBGrid您需要通过TDataSource将其连接到TDataSet (在您的情况下为TMyTable )。

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). 另一方面, TMyTable.Execute将仅在服务器上运行您的SQL代码,而不检索任何数据(受影响的行上的某些信息除外)。

You normally use Execute for INSERT , DELETE , UPDATE , etc and Open for SELECT statements. 通常,对INSERTDELETEUPDATE等使用Execute ,对SELECT语句使用Open

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM