October 1st, 2012, 12:40 PM
-
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!
October 25th, 2012, 04:47 AM
-
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=ServerIP
atabase 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