Subject Re: [IBO] Re: TIBODatabase Paths & Aliases?
Author Helen Borrie
At 01:23 PM 23/09/2006, you wrote:

>I'm using Delphi 2006, IBObjects Trial 4.6. (I've bought the paid
>version IBO components, just haven't installed them yet).

Stay away from the 4.6Bc sub-release for now (which is what you will
get from your current registered download). It's being fixed
if you have a trial installed and working, hold it at that for the time being.

>I wan't to develop and test on my standalone local computer which does
>not have a static IP address,

A standalone computer always has a static IP address that can be
accessed by the TCP/IP service running on that machine. It is If you place a suitable entry in the
c:\%windir%\system32\drivers\etc\hosts file like this: localhost

then you will be able to access this as localhost. (A.K.A. "TCP/IP
local loopback server"). [ %windir% is winnt on Win2K, windows on XP or svr3K ]

>and deploy the app & db to any
>workstation/server whether standalone (no fixed IP) or in a workgroup
>or domain.
>1. Is it possible to do this, given that I presume that my development
>machine must use cpLocal, but the deployed app must presumably use

That assumption is wrong. cpLocal is something different, peculiar
to Windows. It is the 'IPServer' protocol, which is an emulated
network layer. If you write a client app that can only connect using
cpLocal, it won't work in a network. My advice for cpLocal is to
reserve for use *only* with apps you're going to deploy with the
Embedded client/server (which apparently isn't what you're talking about here).

>2. Is it possible to cater for all user protocol permutations with one

It's >>possible<< but there are very good reasons to stay well away
from cpNetBEUI. It's a very poor protocol to use for client/server
and it's in the process of being deprecated.

>3. When I use cpLocal on my development machine, I can enter my alias
>ok in both the databaseName & Path properties.

Don't. Enter it only in the Path property. >> IGNORE << both
Database and DatabaseName.

>But I am not sure
>exactly what to enter in the Database field in the IBODatabase editor.

If you have entered the correct Server, Protocol and Path properties,
the database editor should come up and show you the proper connection
string composed of these properties. So, for example, if your Server
is 'localhost', protocol cpTCP_IP and Path is your alias, e.g.
MyDatabase, then the database editor's connection string should
appear as "localhost:MyDatabase". If there isn't anything there,
then type that in, noting the syntax carefully.

>The editor has an elipsis button and then I can make an entry and then
>I have to press the "find" button. It will only accept the entry if it
>can find the alias/path. So exactly what should I put in this box?

Hmm, is this what's causing your problems? If you want to use the
ellipsis as a way to "find" your database file, you are stuck with a
full path. This is nothing but a Windows filesystem dialog and
Windows has no knowledge of Firebird path aliases, which are parsed
and analysed at connection time by the Firebird client library (fbclient.dll).

>Can you give me a specific example? (eg: localhost:alias) or something?

localhost:alias is fine, as long as your Protocol is cpTCP_IP.

As for making your app deployable, stick fast with TCP/IP. It's the
only remote protocol that's valid across platforms. Standardise on
one aliasname for your database. Provide your own ini file or
connection dialog to collect the deployment-specific values for
Server (IP address or hostname), username and password.