Firebird 2.5 DB on port 3051

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ec2
Posts: 21
Joined: Fri 27 Nov 2009 14:14

Firebird 2.5 DB on port 3051

Post by ec2 » Wed 04 Sep 2013 18:32

Hello, I need to access a "Firebird 2.5 DB" on port 3051, I use IBDAC 4.2.7 and Delphi XE2. My attempt to "192.168.1.60:3051" does not work.
How do I get to
Greetings

AndreyZ

Re: Firebird 2.5 DB on port 3051

Post by AndreyZ » Thu 05 Sep 2013 06:07

Hello,

Take a look at the following article: http://www.firebirdfaq.org/faq259/
When connecting to a different port, you need to supply it as part of connection string:
server_host/port:/path/to/database.fdb

Example:

192.168.0.11/3051:c:\database.fdb
You should use such connection string in the TIBCConnection.Database property.

Jank
Posts: 35
Joined: Tue 11 May 2010 11:57

Re: Firebird 2.5 DB on port 3051

Post by Jank » Thu 10 Oct 2013 15:06

Hi,

i have a Question to this. I set my ibConnection.Database-Property to localhost/3050:c:\db\mydb.FDB. If I Connect to the Database I get this error:

unsupported on-disk structure for file D:\interbase\25\bike.GDB; found 32779.10, support <Missing arg #4 - possibly status vector overflow>.<Missing arg #5 - possibly status vector overflow>

It theems, it connects to the wrong serverversen.
If I set the propertys this way, I can connect without the error. Imho is both the same way.

ibConnection.server:='localhost/3050';
ibConnection.Database:='c:\db\mydb.FDB';

I am using IBDAC 5.1.4 with xe4. In my Delphi 2009 with IBDAC 3.50 both ways are working.

Edit: If I set the Firebirdserver to a port <> 3050 and change the connection-string there is no problem. It is only a Problem with the default port. But I have the same Problem if I don't append the default-port.

Regards Jan

AndreyZ

Re: Firebird 2.5 DB on port 3051

Post by AndreyZ » Fri 11 Oct 2013 07:26

You can find the detailed information about the 'Unsupported on-disk structure ...' error at http://www.firebirdfaq.org/faq80/ . As I see, you encounter this error because you are trying to connect to an InterBase database ("D:\interbase\25\bike.GDB") using the Firebird client library. When you connect to a Firebird database ("c:\db\mydb.FDB") using the same Firebird client library, you do not encounter any errors. You should always use a client library that comes with the server, InterBase or Firebird.

Jank
Posts: 35
Joined: Tue 11 May 2010 11:57

Re: Firebird 2.5 DB on port 3051

Post by Jank » Fri 11 Oct 2013 08:17

Oh no, that was my fault, I try to connect to "D:\interbase\25\bike.GDB", thats true, but its an firebird-Database. I didn'T have an Interbase installed. The name of my db-path is d:\intebase\ since years and i didn't changed it with firebird. I know, its crazy, but thats what I am. I also use "gdb" since this time as fileextension.
I changes the databasename in the post to "c:\db\mydb.FDB" to don't raise confusion but I missed to change it in the errormessage and now we have the total confusion :). I am so sorry.

Okay, so I have still the error. But I know, the problem, i have also a FB1.5 installed and its running on Port 3051. I don't know, what I did, but if I connect to localhost:SomeDatabase it seems, that it connects to the fb1.5-server. If I connect to localhost/3050:SomeDatabase it connects to the fb2.5 server.
So if I set ibconnection.database to 'localhost/3050:SomeDatabase' in the IBCClasses.GetFullDatabaseName-Methode the Port ist thrown away, except i set the var ForceUsingDefaultPort to true.
If I set ibconnection.server := 'localhost/3050' and ibconnection.database = 'somedatabase' its not necessary to set ForceUsingDefaultPort to true.

So I stay on my point, ibconnection.server := 'localhost/3050' and ibconnection.database = 'somedatabase' should work the same way like ibconnection.database = 'localhost/3050:SomeDatabase'.

AndreyZ

Re: Firebird 2.5 DB on port 3051

Post by AndreyZ » Fri 11 Oct 2013 09:16

The ForceUsingDefaultPort variable is used only for the Port property. When you set the Database property to 'server/port:database', IBDAC parses this value and set the Server property to 'server', the Port property to 'port'. In this case, the Server property does not contain the port value and you can control the port usage by the ForceUsingDefaultPort variable.
When you specify the port directly in the Server property, IBDAC considers this as forcing of port usage. We cannot change such behaviour of the Server property as it is used by most of IBDAC users.

Post Reply