Recent

Author Topic: Connecting firebird database on a local network  (Read 15929 times)

tiberi72

  • New Member
  • *
  • Posts: 24
    • Personal Homepage
Connecting firebird database on a local network
« on: October 10, 2012, 12:19:03 pm »
Hello, I have a big problem.
I have created a program wich firebird database.
When I work in local no problem.
So now I want to connect in the LAN my program.
I have a server where I have istalled firebird super server 2.5.1 (the name of the server is "server").
In the clients I have istalled firebird superserver too
The database is in the folder c:\condivisa\ of the server and it is called datinilu.fdb.
I attach an example of my program.
Can anyone explain me what kind of modify I have to do to this program to connect a client to the server "server"?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Connecting firebird database on a local network
« Reply #1 on: October 10, 2012, 01:45:41 pm »
There's no need to install the server part of firebird on your clients.

Don't set the hostname part of your ibconnection to localhost but to the server's hostname/IP address (which is apparently server).

You can use c:\condivisa\datinilu.fdb as databasename, but it is better to modify your aliases.conf on your server and add something like this:
datanilu = c:\condivisa\datinilu.fdb
so you can just use datanilu as database name.

Haven't looked further into your program, hope this can get you started.

You haven't said:
- what went wrong exactly
- what your Lazarus version and operating system is.

For more details on Firebird, check the wiki:
http://wiki.lazarus.freepascal.org/firebird#Client.2Fserver
and
http://wiki.lazarus.freepascal.org/SQLdb_Tutorial1

Good luck!
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

tiberi72

  • New Member
  • *
  • Posts: 24
    • Personal Homepage
Re: Connecting firebird database on a local network
« Reply #2 on: October 11, 2012, 10:18:00 am »
the problem is that when i change the hostname to server (or with the IP address) and I set connected to true, lazarus give me an error
IBConnection1 DoInternal Connect: Unable to complete network request to host : '192.168.1.103'. Failed to estabilish a connection

I verify (with ping command) that the server is connected to the LAN. I check with the IP Address and with the hostname

I try to deactivate windows firewall but the problem still again.

What can I do?

Lazarus version 0.9.3.1
free pascal 2.6.1

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Connecting firebird database on a local network
« Reply #3 on: October 11, 2012, 10:29:57 am »
From a client: telnet 192.168.1.103 3050 (or whatever port you use, 3050 is the default) to see if anything is listening on the Firebird port on the server.

My crystal ball tells me the firebird service is not set to start automatically on your server. This ball has been wrong before though.

If that telnet gives results instead of connection failed messages, try with a Firebird tool like Flamerobin installed on a client and see if you can access the server.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

tiberi72

  • New Member
  • *
  • Posts: 24
    • Personal Homepage
Re: Connecting firebird database on a local network
« Reply #4 on: October 11, 2012, 10:39:24 am »
ok, I have found the problem.
Windows firewall of the server block the port.
Now I have solved  :D :D :D

Thank You very much (to your cristall ball too  ;) )!!!!
« Last Edit: October 11, 2012, 10:47:36 am by tiberi72 »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Connecting firebird database on a local network
« Reply #5 on: October 11, 2012, 01:29:54 pm »
Nice & I'll tell the ball thanks for you ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018