C
chendy095
Unregistered / Unconfirmed
GUEST, unregistred user!
//取得数据集
procedure Tdmf.GetClientData(sqlstr:string;ADOQuery:TADOQuery);
var mydataleVariant;
begin
//读数据包
DCOMConnection1.AppServer.getdata(sqlstr,mydata);
ADOQuery.Recordset:=IUnKnown(mydata) as _Recordset;
end;
这段代码是用DCOMconnection连接应用服务器端,取得Recordset成功,我想用socketconnection替换时,ADOQuery.Recordset:=IUnKnown(mydata) as _Recordset;会报错,为什么?DCOMconnection和socketconnection在这里的应用有何不同?
procedure Tdmf.GetClientData(sqlstr:string;ADOQuery:TADOQuery);
var mydataleVariant;
begin
//读数据包
DCOMConnection1.AppServer.getdata(sqlstr,mydata);
ADOQuery.Recordset:=IUnKnown(mydata) as _Recordset;
end;
这段代码是用DCOMconnection连接应用服务器端,取得Recordset成功,我想用socketconnection替换时,ADOQuery.Recordset:=IUnKnown(mydata) as _Recordset;会报错,为什么?DCOMconnection和socketconnection在这里的应用有何不同?