三层次的问题:客户端有13个数据模块,服务器端也有13个程序与之对应,出现内存错误!(200分)

your means is;
all to one is a problem.
i want to know:
your connection type (this one com serer) .
and what you use the components in each module.
let me analyse.
 
perhaps you should before close the window,disconnect all of connection
to the com server.
 
to dragonlee007:
the connection type is SocketServer of Delphi.
In our application server module, there are many TADODataSet and
TDataSetProvider components, in our client module, we used TClientDataSet.
we will try your way.
thanks.
 
Please run scktsrvr.exe on the com server machine.
 
已经运行过了
 
合起來後,一個可以連上socket server .
這樣該連上了
 
您把李维不好的东西去掉:
DMWM.cdsWMWarehouse.Close;
DMWM.cdsWMWarehouse.CommandText := sInitSQL + sOtherSQL;
DMWM.cdsWMWarehouse.Open;
改成:
DMWM.cdsWMWarehouse.Close;
DMWM.cdsWMWarehouse.Datarequest(sInitSQL + sOtherSQL);
DMWM.cdsWMWarehouse.Open;
查询时,才用Datarequest,数据处理到中间层去写方法处理,您这样有点累客户端。
并没有形成完全意义上的瘦客户。
在应用层当数据请求时:要加上 Query1.sQl.text:=Input;
致于CommandText为什么不好,改天再讨论。
2:
inherited;
frmwmWarehouse := nil;
您把它也去掉,我建设是,我看很多人也这么用。实际上,您看一下帮助。您在
窗体关闭时,action:=cafree;整个全释放了。您看一下delphi的帮助是不是。对了。
您最好在对数据操作时,不要用MDI窗口。因为数据不好控制。如果要用。关键窗体
您也让用户只能开一个窗口。
3:
if Button = nbDelete then
begin
if not (DMWM.cdsWMWarehouse.FieldByName('status').AsString = 'N') then
begin
DMWM.cdsWMWarehouse.Edit;
DMWM.cdsWMWarehouse.FieldByName('status').AsString := 'D';
DMWM.cdsWMWarehouse.Post;
DMWM.cdsWMWarehouse.ApplyUpdates(0);
DMWM.cdsWMWarehouse.Refresh;
Abort;
end;
end;
我一般很少用这种代码。您最好在中间层写成方法,直接传参数过去。中间层用
SQL来完成。速度快。您这样并没有休现瘦客户端的特点呀!
我想问您,您按我的方法做了吗?开二个delphi,如果客户端和应用层有错,它自动
会跳出来。这样,您可以总结为什么老在进行什么操作时出错的。您在应用加一个
记数器,上来一次加一次,下去减一次。非正常退出。保留其值。DCOM本身有死亡检查,
如果您非正常退出。过一会儿,它会帮您把值减掉的。。。。我看了您的程序。您非得将很
多处理全放到中间层。这是三层结构开发的中心思想。祝您好运。宝贝



 
to All:
对不起,各位,这段时间公司的网络出了些问题,没能及时把信息反馈给大家,很抱歉.
现在,我们的程序出现的问题已经解决,解决的方法就是:
** 在关闭主程序时关闭所有Data Module上SocketConnectiong的连接 **
我想可能是这样的:当我们关闭客户端时,应用程序服务器自动关闭是一个假象.应用程序
服务器数量少时可能没有问题,但是数量一多就会出现问题.
这种想法是否正确,还请高手指正.
感谢这段时间以来,大富翁上朋友的支持和帮助,你们的热心帮助是大富翁论坛成长的
重要支柱,再次感谢!尤其感谢dragonlee007大侠的帮助!
我想,现在三层次的应用越来越广泛,而很多应用三层次技术的公司还处于起步阶段,思想
还停留在两层上(包括我们),这对以后的发展是很不利的.希望大家能继续讨论三层次的问题
,让更多的人受益.
区区200分,不成敬意,望各位笑纳.我想这种讨论的氛围才是最最宝贵的财富!!
祝大家好运!!!
 
多人接受答案了。
 
顶部