📄 94.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://bbs.tsinghua.edu.cn"><font face="黑体"><big><big>水木清华★</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center"> Delphi编程 (BM: strayli FlyingBoy) </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="454"> <p align="center">[<a href="index.htm">回到开始</a>][<a href="15.htm">上一层</a>][<a href="95.htm">下一篇</a>]
<hr><p align="left"><small>发信人: strayli (stray), 信区: Delphi <br>
标 题: A Technical View of Borland MIDAS Part II (10) <br>
发信站: BBS 水木清华站 (Thu Nov 12 22:27:06 1998) WWW-POST <br>
<br>
Using OLEnterprise <br>
OLEnterprise is an alternative to DCOM. If you use OLEnterprise, then you do <br>
not need to have DCOM on your system. <br>
<br>
OLEnterprise has several advantages over DCOM: <br>
<br>
It will allow you to make connections between two Windows 95 machines, even <br>
if no NT server is available. Connections without a server is impossible <br>
under DCOM. Connections between two Windows 95 machines even when a server is <br>
present are either impossible or extremely problematic under DCOM. In <br>
particular, DCOM only seems to work reliably when you are placing servers on <br>
NT machines. You can connect from a Windows 95 machine to an NT machine with <br>
DCOM, but not vice versa, nor can you reliably connect between two Windows 95 <br>
machines. (As far as I can tell it is impossible to place a server on a <br>
Windows 95 machine for remote connections, but I am hedging a bit here since <br>
this area is so poorly documented that I may have missed a trick hidden in <br>
some obscure location. Also, I suppose that this state of affairs will change <br>
as DCOM matures. At any rate, I have never spoken to any one who has made the <br>
connection successfully, though many very talented programmers have tried.) <br>
OLEnterprise has an Object Broker that will allow you to distribute the load <br>
of connections over multiple machines. In particular, each time a new user <br>
signs on to a database, they can be randomly routed to an available server, <br>
thereby distributing the load over multiple servers. The act of replicating <br>
the data between servers is, quite naturally, not supported by OLEnterprise, <br>
but is instead the responsibility of the server itself. <br>
OLEnterprise has fail over capability available through writing a few lines <br>
of code. <br>
Here is the fail over example, as provided by the good graces of the <br>
indefatigable Mike Destein: <br>
<br>
procedure TForm1.Button2Click(Sender: TObject); <br>
<br>
begin <br>
<br>
try <br>
<br>
ClientDataset1.ApplyUpdates(-1); <br>
<br>
except <br>
<br>
on eOle : EOleException do begin <br>
on eOle : EOleException do begin <br>
<br>
Case eOle.Errorcode of <br>
<br>
-2147023169 : // I dont know the const name <br>
<br>
begin <br>
<br>
// Handle RPC failure by resetting server <br>
<br>
RemoteServer1.Connected := False; <br>
<br>
RemoteServer1.connected := TRUE; <br>
<br>
ClientDataset1.ApplyUpdates(-1); <br>
<br>
end; <br>
<br>
else showMessage(intToStr(eOle.errorCode)); <br>
<br>
end; <br>
<br>
end; <br>
<br>
end; <br>
<br>
end; <br>
<br>
<br>
<br>
-- <br>
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 202.38.79.111] <br>
</small><hr>
<p align="center">[<a href="index.htm">回到开始</a>][<a href="15.htm">上一层</a>][<a href="95.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -