unit RevoteTable;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, DB, DBClient,ADODB,SConnect;<br><br>type<br> TRevoteTable = class(TCLIentDataSet)<br> private<br> SocketConnection1: TSocketConnection;<br> FTableName: string;<br> FSQL: TStrings;<br> procedure SetTableName(const Value: string);<br> procedure SetSQL(const Value: TStrings);<br> protected<br> { Protected declarations }<br><br> public<br> constructor Create(AOwner: TComponent); override;<br> destructor Destroy; override;<br><br> procedure execSQL;<br> procedure calcField(aTable:TDataSet);<br> procedure open;<br> { Public declarations }<br> published<br> property SQL: TStrings read FSQL write SetSQL;<br> property TableName: string read FTableName write SetTableName;<br> { Published declarations }<br> end;<br>var<br> g_IP : string;<br> g_Port : Integer;<br>implementation<br><br>基本原理:<br>做个新类,继承TCLIentDataSet,实现TADOQuery,TadoTable的用到的接口,再用TRevoteTable替换TAdoQuery即可,其它代码基本不用修改