网站地图| 免费获取|
毕业论文网
  • 网站首页|
  • 论文范文|
  • 论文降重|
  • 职称论文发表|
  • 合作期刊|
  • 论文下载|
  • 计算机论文|
  • 外文翻译|
  • 免费论文|
  • 论文资料|
  • 论文开题报告
搜索

当前位置:毕业论文网 -> 免费论文 -> 计算机论文 -> 分布式多层数据库系统的应用(三)
计算机论文资料| ASP设计| Delphi| VB设计| JSP设计| ASP.NET设计| VB.NET| java设计| VC| pb| VS| dreamweaver| c#.net| vf| VC++| 计算机论文范文| 论文下载| 自动化论文

分布式多层数据库系统的应用(三)

最新活动:微信集50个赞就可获取任意一篇钻石会员文档。详情见微信集赞换文档
分布式多层数据库系统的应用(三) 或者应用服务器IP地址)和应用服务器的端口号,这些配置信息将用来连接应用服务器。如果连接成功,输入的配置信息将被写入到注册表中,以后程序启动时,读取注册表配置信息,就可而已连接应用服务器程序了。程序的具体实现部分如程序清单如下所示。
procedure BitBtn1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
procedure WriteToReg(const bappHost,bappIp,aPort:string);
{ Private declarations }
public
{ Public declarations }
end;
var
   fm_SerConfig: Tfm_SerConfig;  Connected: boolean= false;   //代表是否连接成功
 implementation
 uses netlist, data;
 {$R *.dfm}
 procedure Tfm_SerConfig.BitBtn1Click(Sender: TObject);
 begin
    if ((Edt_host.Text='') or (Edt_host.Text=null))
       and((Edt_ip.Text='') or (Edt_host.Text=null)) then
    begin
    application.MessageBox('请输入服务器和IP','输入错误',
                      mb_iconinformation + mb_defbutton1);
    exit;
    end;
    try
      strtoint(edt_Port.text);
    except
       Application.MessageBox('请输入正确的端口号', '输入错误..', mb_iconinformation + mb_defbutton1);
      exit;
    end;
    statusbar1.Panels[0].Text:='正在连接服务器,pleale wait';
    statusbar1.Refresh;
    screen.Cursor:=crHourGlass;
    fm_data.Socket.Connected:=false;
    fm_data.Socket.Host:=edt_host.Text;
    fm_data.Socket.Address:=edt_ip.Text;
    fm_data.Socket.Port:=strtoint(edt_port.Text);
    try
      screen.Cursor:=crdefault;
      fm_data.Socket.Connected:=true;
      application.MessageBox('连接成功','图书管理系统', mb_iconinformation + mb_defbutton1);
      connected:=true;
    except
      screen.Cursor:=crdefault;
      application.MessageBox('连接失败','图书管理系统',mb_iconinformation+mb_defbutton1);
      connected:=false;
    end;
 //连接成功向注册表里写入应用服务器配置信息
   WriteToReg(edt_Host.Text, edt_IP.Text, edt_Port.Text);
   close;
 end;
 //利用可视化窗体来选择计算机
 procedure Tfm_SerConfig.Button1Click(Sender: TObject);
 begin
 edt_ip.Clear;
 edt_host.Text:=   NetExecute(TFm_NetList);
 end;
 //把信息写入注册表
 procedure Tfm_SerConfig.WriteToReg(const bappHost,bappIp,aPort:string);
 var
 reg:Tregistry;
 begin
   reg:=Tregistry.Create;
   reg.RootKey:=HKEY_LOCAL_MACHINE;
   if not reg.OpenKey('\Software\pz',false) then //如果可以创建目录
   begin
   reg.CreateKey('\Software\pz');
   reg.OpenKey('\Software\pz',false);
   end;
   reg.WriteString('host',bapph

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 3/8/8

分布式多层数据库系统的应用(三)由毕业论文网(www.huoyuandh.com)会员上传。
原创论文资料流程 相关论文
上一篇:delphi医嘱管理系统[开题报告+文.. 下一篇:商品销售管理系统文档
推荐论文 本专业最新论文
Tags:分布式 多层 数据库 系统 应用 2010-04-15 22:10:05【返回顶部】
精彩推荐
发表论文

联系方式 | 论文说明 | 网站地图 | 免费获取 | 钻石会员 | 硕士论文资料


毕业论文网提供论文范文,论文代发,原创论文资料

本站部分文章来自网友投稿上传,如发现侵犯了您的版权,请联系指出,本站及时确认并删除  E-mail: 17304545@qq.com

Copyright@ 2009-2020 毕业论文网 版权所有