开发环境 x6 win7 64位,没有打update1补丁,怕打了破解不了,开发出的程序再win32 bebug文件夹中应该是32位的吧
刚学习datasnap,服务器就是用DataSnap server做的,选的Forms Application->vcl appliction->tcp/ip http sample methods->TDSServerModule,创建完毕后再ServerMethodsUnit1里面放了个tadoconnection->tadoquery->tdatasetprovidor
客户端先创建了一个vcl application,然后new->other->DataSnap Client Module->Local server->DataSnap stand alone server->tcp/ip,然后再ClientModuleUnit1上放了SQLConnetion1->TDSProviderConnection->TClientDataSet,设置好连接属性,主窗体上放个Tdbgrid->TDataSet,dataset连ClientDataSet,然后open就能从服务器查询adoquery中查询的数据了
在win7下一切正常,不过客户端在xp下报地址错误
测试情况
服务器 客户端
win7 ok win7 ok
win7 ok xp error
xp win7 ok
用pa再win7上调试,报错断点到Datasnap.DBClient里的红色地方
procedure TCustomClientDataSet.InternalCheck(Status: DBResult);
var
UTF8ErrorMessage: NativeUInt;
ErrMsg: string;
ErrMsgBuffer: array of Byte;
begin
if Status <> 0 then
begin
SetLength(ErrMsgBuffer, 2049);
FDSBase.GetErrorString(Status, Pointer(@ErrMsgBuffer[0]));
FDSBase.GetProp(dspropUTF8ERRORMSG, @UTF8ErrorMessage);
if LongBool(UTF8ErrorMessage) then
ErrMsg := TMarshal.ReadStringAsUtf8(TPtrWrapper.Create(ErrMsgBuffer)).Trim
else
ErrMsg := TMarshal.ReadStringAsAnsi(TPtrWrapper.Create(ErrMsgBuffer)).Trim;
raise EDBClient.Create(ErrMsg, Status);
end;
end;
求高手帮助,是要打补丁还是设置什么参数?
我只试了把数据源从ado换成dbexpress还是报错
谢谢
