三层结构中,应用服务器,用socket连接,但在程序执行
if not SocketConnection.connectioned then SocketConnection.connectioned:=true;
时出现no address specified!错误,
但在设计时,SocketConnection的connected属性改为true没有任何错误,
请问高手这是为什么????

解决方案 »

  1.   

    你没有运行socketsrvr.exe吧。
    这个程序在delphi的安装目录下bin目录里。
      

  2.   

    先运行scktsrvr.exe文件。在窗体创建时加入.
    socketconnection1.address:='服务器的IP';
    socketconnection1.connected:=true;
      

  3.   

    有运行scktsrvr.exe文件。在窗体创建时加入.
    socketconnection1.address:='服务器的IP';
    socketconnection1.connected:=true
    都是正确的
      

  4.   

    先运行scktsrvr.exe文件。在窗体创建时加入.
    socketconnection1.address:='服务器的IP';
    socketconnection1.servername:='COM服务名';
    socketconnection1.connected:=true;
      

  5.   

    scktsrvr.exe 先运行起来可是必不可少的。