TDBXCommand TDBXReader
2015-08-20 10:53
316 查看
TDBXCommand *cmd;
cmd= FDBXConnection->CreateCommand();
cmd->CommandType=TDBXCommandTypes_DSServerMethod;
FFindDataSetCommand->Text = "TServerMethods1.FindDataSet";
cmd->Parameters->Parameter[0]->Value->GetDBXReader();
cmd->ExecuteUpdate();
if (FInstanceOwner)
cmd->FreeOnExecute(result);
FreeOnExecute registers the object indicated by
Categories:
CommandType
TDBXWritableValue* Value;
Value->GetDBXReader();
TDBXReader *reader;
reader =Value->GetDBXReader();
reader= cmd->ExecuteQuery();
TDBXCommand instances can be created by calling one of the TDBXConnection.CreateCommandmethods. As soon as an application is finished using a command, the TDBXCommand.Free method must be called. This releases memory for the command and any associated resources.
TDBXCommand 应用程序会释放内存,内存释放问题泄露问题也不用担心了!
TDBXReader provides a unidirectional reader for a collection of database rows.
TDBXReader provides a forward only reader for a collection of database rows.
TDBXReader is returned by TDBXCommand.ExecuteQuery. Call TDBXReader.Next to access the first and successive rows in the collection. Row values can be accessed using the Value array property. Value is overloaded so it can be indexed either by ordinal position or by column name.
可见TDBXReader 比较简单,单向数据集,只有Next方法,没有Prior()方法,没有RecordCount属性。
并且当应用程序不再使用该实例时会自己释放内存这点比较强。解决了内存释放泄露的问题。
做c++builder不用再担心内存释放的问题了。
cmd= FDBXConnection->CreateCommand();
cmd->CommandType=TDBXCommandTypes_DSServerMethod;
FFindDataSetCommand->Text = "TServerMethods1.FindDataSet";
cmd->Parameters->Parameter[0]->Value->GetDBXReader();
cmd->ExecuteUpdate();
if (FInstanceOwner)
cmd->FreeOnExecute(result);
FreeOnExecute registers the object indicated by
Value, and frees it the next time the command is executed, closed, or freed.
Categories:
CommandType
#define TDBXCommandTypes_DbxSQL L"Dbx.SQL" #define TDBXCommandTypes_DbxStoredProcedure L"Dbx.StoredProcedure" #define TDBXCommandTypes_DbxTable L"Dbx.Table" #define TDBXCommandTypes_DbxMetaData L"Dbx.MetaData" #define TDBXCommandTypes_DbxCommand L"Dbx.Command" #define TDBXCommandTypes_DbxPool L"Dbx.Pool" #define TDBXCommandTypes_DSServerMethod L"DataSnap.ServerMethod"
TDBXWritableValue* Value;
Value->GetDBXReader();
TDBXReader *reader;
reader =Value->GetDBXReader();
reader= cmd->ExecuteQuery();
TDBXCommand instances can be created by calling one of the TDBXConnection.CreateCommandmethods. As soon as an application is finished using a command, the TDBXCommand.Free method must be called. This releases memory for the command and any associated resources.
TDBXCommand 应用程序会释放内存,内存释放问题泄露问题也不用担心了!
TDBXReader provides a unidirectional reader for a collection of database rows.
TDBXReader provides a forward only reader for a collection of database rows.
TDBXReader is returned by TDBXCommand.ExecuteQuery. Call TDBXReader.Next to access the first and successive rows in the collection. Row values can be accessed using the Value array property. Value is overloaded so it can be indexed either by ordinal position or by column name.
Note: When an application no longer needs a TDBXReader instance, it should call TDBXReader.Free. This ensures that all resources associated with the TDBXReader are released.
可见TDBXReader 比较简单,单向数据集,只有Next方法,没有Prior()方法,没有RecordCount属性。
并且当应用程序不再使用该实例时会自己释放内存这点比较强。解决了内存释放泄露的问题。
做c++builder不用再担心内存释放的问题了。
相关文章推荐
- tomcat启动报错
- tomcat启动报错
- hdu-2066 一个人的旅行(SPFA做法)
- HDU-1162 Eddy's picture(最小生成树[Kruskal])
- spring简介-----阿冬专栏
- hdu 2837 Calculation【欧拉函数,快速幂求指数循环节】
- 在tomcat7中启用HTTPS的详细配置
- 【Cocos2dx】新建场景、场景的切换、设置启动场景与菜单的新建
- [转]由Tencent://Message协议想到的一个解决方案
- 关于指针与swap函数
- poj 2531 Network Saboteur(DFS减枝)
- Animation结束后自动恢复到原状态
- Apache DS管理的JAVA实现
- [转]关于新一轮QQ Tencent://Message 在线联系
- 使用docker 部署 ceph
- ActiveMQ session.close与session.commit的区别
- Android微信登陆
- IOS学习计划
- Java replace 和 replaceAll
- Win7/Win8.1升级Win10成功后开机速度变慢的解决办法