0

I am working on some existing project and I am trying to make it go from many firebird databases on the client end to one server based database.

Unfortunately I am having some trouble with the connection string.

Is it possible to connect to a .fdb file on a remote server?

Currently the code is as follows:

var builder = new FbConnectionStringBuilder
        {
            Database = @"C:\test.db",
            ServerType = FbServerType.Embedded,
            Pooling = isPooled
        };

I have read some examples about how it can be done like the below but its not working:

FbConnectionStringBuilder(@"Database=192.168.1.235:C:\share\test.fdb;User ID=sysdba;Password=masterkey;")

It still connects to just the local directory C:\share\test.fdb. As that is not my ip address. Any help?

3 Answers 3

2

The Database property is only for the database filename or alias, you need to use DataSource for the hostname or IP address and Port for the Firebird port. Check out .NET — Examples of use and Connection string parameters

Also the class FbConnectionStringBuilder is intended to simplify building a connection string (it has properties for the various connection string properties), so your first use is correct, but the second use is a bit odd.

Sign up to request clarification or add additional context in comments.

Comments

0

Ok so I think I worked it out. You cannot access an embedded database remotely. So once the server software was installed and this was removed it all worked fine. Would be a handy feature to connect to it on a remote drive but ohh well.

Comments

0

Be sure fireBird is listening on port 3050, uncomment this lines in firebird.conf

RemoteServiceName=gds_db
RemoteServicePort=3050

restart the service.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.