• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

Networking: Allowing CLIENT PC applications to have access to database file on the SERVER PC?

I need to confirm my ideas on networking. I have a client-server application that I'm about to finish and then deploy.
The database file will be installed on the server somewhere like
   C:\Program Files\MyApplication\DB.fdb
When my application runs on all the client PCs, they will need to be able to connect to the DB.fdb file on the Server.

1. What instructions do I give the customer or his/her Network Administrator on how to allow the client applications access to the file?
---Give details for both the Server PC and the Client PCs.
---Please take into account the path's longevity. For example if a Client Application connects to the file using "\\SERVER\DB.fdb" and for some networking reason that I'm not familiar with this path becomes invalid but the user could connect using a different path - this is BAD - we need whatever Path is going to work most of the time and will survive reboots and log ons and log offs.

ISSUES AND INFORMATION:
--All PCs involved will be Windows 2000 or later
--The application is a Win32 application
--The database file is a FireBird database file
0
rfwoolf
Asked:
rfwoolf
  • 7
  • 5
1 Solution
 
NickUpsonCommented:
The server will need to have firebird server, classic or superserver, installed, with appropiate user accounts created

The client PC's will need firebird client installed (may happen as part of the applicaton install)

both client and server need adjustment to firewall settings

The database file or it's folder MUST NOT be shared over the network, access to the database goes client application to server program on server to database file ONLY
0
 
rfwoolfAuthor Commented:
NickUpson, thanks for the response, but I'm afraid I didn't get much of an answer there - I don't understand.
In Delphi I have to create a connection string or tell my connection component the path to the database file. You're saying that data connectivity doesn't work this way and that instead it goes to a program. You also say that I mustn't share anything (which would prevent access to the path to the database file).
Perhaps you can indulge me and help me understand :)
0
 
rfwoolfAuthor Commented:
"The client PC's will need firebird client installed (may happen as part of the applicaton install)" -- from what I understand you just have to deploy the fbclient.dll file for the clients.
0
Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

 
NickUpsonCommented:
your connection string looks something like myserver::C:\Program Files\MyApplication\DB.fdb, instead of your application directly changing the file (like eg access) your sql instruction are passed to the firebird server program running on myserver. Firebird is designed to work this way, NOT by sharing the file. Indeed it specifically attempts to block such access.

It will by default use port 3050 which need to be enabled via the firewall

client install fbclient.dll is a minimum, better is to actually install the client from the firebird install program, which takes care of a couple of other files, registry, etc
0
 
rfwoolfAuthor Commented:
Fantastic. I have installed the client from the Firebird installation program (which isn't great because now my customers have to be told "No, when it gives you options, only install the client stuff"). Anyways, I'll give it a shot. Thanks for the answer!
0
 
rfwoolfAuthor Commented:
Nick - Thanks for the helpful answer. As a last part of the question, do you have any advice on building this connection string, i.e. on the client machines when they're installing and running for the first time, not only do I have to show them a list of computer names (or IP addresses) on the network, but I've also somehow got to get the actual LOCAL PATH (e.g. C:\Program Files\") which the CLIENT machine won't be able to see.
I guess one tactic is to configure things on the server, build the connection string ON THE SERVER, store this connection string in a text file, and then,
on the CLIENT machines get it to navigate to the text file and read the connection string from there.
Is that how you would do it?
0
 
NickUpsonCommented:
The names or IP addresses I don't see a way to do, however your server installation can include creating an alias (name) for the database path in the firebird.conf file (NB need to restart after changing this file). Then your connection string becomes something like myserver::/myalias, then the connection string is the same all the time and can be hardcoded into the clients
0
 
NickUpsonCommented:
correction: the file is aliases.conf not firebird.conf
0
 
rfwoolfAuthor Commented:
"your server installation can include creating an alias (name) for the database path in the aliases.conf file "
--I've spent a long time now looking into the best way to set up this alias programmatically on the Server Installation. Please don't you have any advice on how to do this - I don't want to tell my clients "okay, drag the file into notepad, type in this value" - I'd rather create the alias using an API or something - but there's @#$@-all information out there! :)
0
 
NickUpsonCommented:
There is no api to do this however as you have to supply the database, why not provide them with a copy of the file to use.
0
 
rfwoolfAuthor Commented:
Hi Nick.
Thanks for the answer.
After about 5 hours of searching and thinking and thinking, I eventually came across an indirect solution - one of the Firebird Management Utiilties is called Firebird Database Manager (Freeware) which has an Alias Management module. It also has a nice backup utility and scheduler. So now as part of the configuration after installation I tell the customer to run it and set up an alias that way.
It's by no means ideal, and in fact I can be quite critical of Firebird for this (they will argue that it's the way that it is for security purposes but I disagree - if Linux can do it so can Windows) but what's done is done, my application is now Firebird.
Thanks for the help hey :)!
0
 
rfwoolfAuthor Commented:
There seems to be only 1 expert on here that's knowledgeable about Firebird - NickUpson - keep up the good work.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now