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
- Next message: AlanGLLoyd: "Re: sintoverflow problem"
- Previous message: Maarten Wiltink: "Re: Question about Delphi versus other languages"
- In reply to: pr: "Re: Is it possible to read/write to an ini file using a tcp/ip protocal file address?"
- Next in thread: Jamie: "Re: Is it possible to read/write to an ini file using a tcp/ip protocal file address?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: AlanGLLoyd: "Re: sintoverflow problem"
- Previous message: Maarten Wiltink: "Re: Question about Delphi versus other languages"
- In reply to: pr: "Re: Is it possible to read/write to an ini file using a tcp/ip protocal file address?"
- Next in thread: Jamie: "Re: Is it possible to read/write to an ini file using a tcp/ip protocal file address?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|