Re: Is it possible to read/write to an ini file using a tcp/ip protocal file address?

From: DS (DS_at_btinternet.com)
Date: 10/19/04


Date: Tue, 19 Oct 2004 09:07:25 +0100

Hi

You are correct in saying that I am using fb1.5. And yes I have been
forgetting that I have a connection string rather than a path :(

So just to get clear in my mind, are you suggesting:
On the server:
1) In my installation routine's instructions I tell the users/network
manager to install the database for my app, 'myDatabase' to a mapped drive
2) Allow FB to install to its default position
3) get my installation routine to modify/create an aliases.conf file into
the root of the firebird dir ie c:\program files\firebird\firbird 1.5\
4) get my installation routine to write myDatabase = application
dir\myDatabase, where 'application dir' is the actual drive and folder where
the database has been installed (rather than the mapped drive) to the
aliases.conf file.
5) save the ini file holding the licence/registartion data to the same
location of myDatabase ie the mapped drive

On clients machines:
1) Get my app's client installation routine to prompt the user for the
install location of the database ie the mapped drive and save it to a local
ini file
2) write my app so that it reads the ini file for the mapped drive and then
uses somthing like ExpandUNCFileName to get \\serverName\ that i can use it
to create a connection string like serverName:myDatabase.
3) write my app so it checks to see if it is registered by reading from the
ini file stored in the same location as myDatabase.

If I have understood you correctly, there does seem to be a fair amount of
extra work involved with this approach. I am also concerened that the
aliases.conf is in the fb dir and thus changeble by other installation
routines/programs. Where ever possible I have tried to possible
interatctions with other installations to min ie by using fbclient.dll as
oppossed to gds32.dll, storing ini files in exe dir rather than system dirs.

On that basis, is this an exceptable alternative?
On the server:
1) In my installation routine's instructions I tell the users/network
manager to install the database for my app, 'myDatabase' to a NON mapped
drive.
2) make my apps folder shared, but do not change its share name.
3) Allow FB to install to its default position

On the client machines:
1) Get my app's client installation routine to prompt the user for the
tcp/ip connection string for mydatabase and save it to a local ini file
2) write my app so that it reads the ini file for the connection string
3) write a routine that creates a unc path from the tcp/ip connection
string. (This is the bit I am really unsure of. If I have told them to make
the database folder shared and NOT change the name, is there likly to be any
problems with simply adding '\\' at the begining and removing
':driveLetter:' ie serverName:driveLetter:\applicationFolder\ will become:
\\serverName\shareName\ as applicationFolder will be the same as
shareName.)
4) write my app so it checks to see if it is registered by reading from the
ini file using the constructed UNC path

Thanks for the help on this. It is making me express what i am doing and
thus think more clearly about the whole thing.

D

snip
> Server1:C:\Program Files\myProg
>
> is an example of the required connection string for e.g.
> Firebird 1.03 when using the TCP/IP protocol. FB 1.03 has
> the limitation that the full path must be known to the server
> engine, and thus can only be used with fully shared drives.
> If this is not an option you must change to FB 1.5 and use
> the aliasing facility.
> My suggestion, use a mapped drive, use Win API calls to
> determine the server name and share to which the drive is
> mapped to, and then use FB 1.5 and the aliases to connect
> to the database.
> This sounds like quite a bit of hassle, and it is. On the
> benefit side your program will also be able to work with
> file servers running on Linux. Preliminary investigations
> seem to indicate that this alone results in a 100% speed
> increase compared to an XP based server (peer-to-peer).
>
> PR



Relevant Pages

  • Re: Is it possible to read/write to an ini file using a tcp/ip protocal file address?
    ... In my installation routine's instructions I tell the users/network ... save the ini file holding the licence/registartion data to the same ... write my app so that it reads the ini file for the mapped drive and then ... to create a connection string like serverName:myDatabase. ...
    (alt.comp.lang.borland-delphi)
  • Re: storing application wide value - ini file / registry / hard coded?
    ... set up during the application installation ... > an ini file, ... values as a command-line parameter in the shortcut that starts the app. ... create an 'ID' folder in the app directory. ...
    (borland.public.delphi.language.objectpascal)
  • storing application wide value - ini file / registry / hard coded?
    ... I have a C/S app that needs to get distributed at a number of locations. ... locationID somewhere and load it each time a client starts (alternatively I ... set up during the application installation ... I tend to find the easiest, but if the ini file got lost it ...
    (borland.public.delphi.language.objectpascal)
  • Re: Detect if db is empty
    ... I already check for dbversion table and its structure, and if ok, ... Now I submit with the app a simple script that create db, ... Then set the connection string in web.config to use this db and this ... really bothered about to test if you need the intitial installation. ...
    (microsoft.public.sqlserver.server)
  • Re: Had to uninstall Safari
    ... If by 'deep' you mean 'in a folder clearly named for the app in a folder ... One I use, Native Instruments "Battery", has files in: ... installation. ...
    (comp.sys.mac.advocacy)