#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    3
    Rep Power
    0

    Winsock and Internet


    Hello!
    I wrote cod Client and Server. The code works. On one computer is the connection and the data takes. But why is no connection on different computers over the Internet.
    Prompt! Thank you!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    119
    Rep Power
    0

    Solutions of the problem.


    Hi dear

    Please find the answer of your problem.
    First you need to check your connection string which is embedded in your program. You would not added server name in connection string. If there is look like as connectivity to firebird database
    ConnectionString =

    'DRIVER=Firebird/InterBase(r) driver; UID=****; PWD=*****;'+
    'DBNAME=ServerIPatabase Path;

    You need to specify in dat file your server ip. And one thing is your database folder must be shareable to accessing user. Then you can simply access the connection from server database.
    Here is a small source code for connecting multiple systems through a single database server.
    procedure CreateConnection;
    const
    Constr = 'DRIVER=Firebird/InterBase(r) driver;UID=XXXXX;PWD=XXXXX;'+
    'DBNAME=192.*.*.*:C:\Program Files\DataBase\EXAMPLE.FDB';
    begin

    ADOConnection1.ConnectionString := constr;
    ADOConnection1.Connected := True;
    ADOConnection1.Open;
    If ADOConnection1.Connected then
    ShowMessage('Connection is active');
    ADOQuery1.Connection := ADOConnection1;
    ADOQuery1.SQL.Text := 'Select * from Test';
    ADOQuery1.Open;
    ShowMessage('Total Records = '+IntToStr(ADOQuery1.RecordCount)+' '+ ADOQuery1.Fields[2].AsString);
    end;


    Here 'DBNAME=192.*.*.*: C:\Program Files\Database\EXAMPLE.FDB'
    This is database server ip address, and rest of server database path


    thanks
    diya

IMN logo majestic logo threadwatch logo seochat tools logo