Solved

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

Posted on 2008-10-08
12
163 Views
Last Modified: 2010-04-12
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
Comment
Question by:rfwoolf
  • 7
  • 5
12 Comments
 
LVL 19

Expert Comment

by:NickUpson
ID: 22671496
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
 
LVL 13

Author Comment

by:rfwoolf
ID: 22671951
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
 
LVL 13

Author Comment

by:rfwoolf
ID: 22672518
"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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 19

Accepted Solution

by:
NickUpson earned 500 total points
ID: 22673426
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
 
LVL 13

Author Comment

by:rfwoolf
ID: 22673622
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
 
LVL 13

Author Comment

by:rfwoolf
ID: 22673783
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
 
LVL 19

Expert Comment

by:NickUpson
ID: 22676087
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
 
LVL 19

Expert Comment

by:NickUpson
ID: 22676699
correction: the file is aliases.conf not firebird.conf
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 22683874
"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
 
LVL 19

Expert Comment

by:NickUpson
ID: 22684620
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
 
LVL 13

Author Comment

by:rfwoolf
ID: 22686152
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
 
LVL 13

Author Comment

by:rfwoolf
ID: 22686159
There seems to be only 1 expert on here that's knowledgeable about Firebird - NickUpson - keep up the good work.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question