H
hyxic
Unregistered / Unconfirmed
GUEST, unregistred user!
服务器用remotedatamodule,客户端用socketconnection连接
1。我的客户端代码:
function TSysDM.ApplyUpdates(dsClientlevariant):Integer;//提交修改到数据库
var
ErrMsg:Variant;
i:Integer;
begin
ErrMsg:=0;
for i:=0 to dsCount-1do
begin
dsClient.CheckBrowseMode;
if dsClient.ChangeCount>0 then
SckConn.AppServer.ApplyUpdates(dsClient,ErrMsg);
end;
Result:=ErrMsg;
end;
2。我的服务器端代码:
procedure TEliteSrv.ApplyUpdates(dsClientlevariant;
var ErrMsg: OleVariant);
var
ECount:Integer;
cmp:TComponent;
cmpdsp:TDataSetProvider;
begin
cmp:=FindComponent(CustName);
If (not Assigned(cmp)) or (not (cmp is TDataSetProvider)) then
SysUtils.Abort;
cmpdsp:=TDataSetProvider(cmp);
try
if not VarIsNull(CustVar) then
begin
cmpdsp.ApplyUpdates(CustVar,0,ECount);
If ECount>0 then
begin
ErrMsg:=ECount;
SysUtils.Abort;
end;
end;
except
ErrMsg:=ECount;
end;
end;
第一次保存一点问题都没有,如果连续保存的话就出问题了,怎么也保存不了,提示:无法定位行记录或某些正用户在使用它?
晕了一个多月,那位高手指点一下,在线送分,家当全给了!!!!!!!!!!
1。我的客户端代码:
function TSysDM.ApplyUpdates(dsClientlevariant):Integer;//提交修改到数据库
var
ErrMsg:Variant;
i:Integer;
begin
ErrMsg:=0;
for i:=0 to dsCount-1do
begin
dsClient.CheckBrowseMode;
if dsClient.ChangeCount>0 then
SckConn.AppServer.ApplyUpdates(dsClient,ErrMsg);
end;
Result:=ErrMsg;
end;
2。我的服务器端代码:
procedure TEliteSrv.ApplyUpdates(dsClientlevariant;
var ErrMsg: OleVariant);
var
ECount:Integer;
cmp:TComponent;
cmpdsp:TDataSetProvider;
begin
cmp:=FindComponent(CustName);
If (not Assigned(cmp)) or (not (cmp is TDataSetProvider)) then
SysUtils.Abort;
cmpdsp:=TDataSetProvider(cmp);
try
if not VarIsNull(CustVar) then
begin
cmpdsp.ApplyUpdates(CustVar,0,ECount);
If ECount>0 then
begin
ErrMsg:=ECount;
SysUtils.Abort;
end;
end;
except
ErrMsg:=ECount;
end;
end;
第一次保存一点问题都没有,如果连续保存的话就出问题了,怎么也保存不了,提示:无法定位行记录或某些正用户在使用它?
晕了一个多月,那位高手指点一下,在线送分,家当全给了!!!!!!!!!!