Subject Re: [IBO] IBO 4.3 - IB-6 - Win98
Author Helen Borrie
At 06:02 PM 28/07/2004 -0300, you wrote:
>Dear Friends
>I finished my application from BDE/Pdox to IB6 with IBO 4.3 (still not
>registered).
>IB-6.01 (the same available in Borland Site) installed in Windows 2000
>Server or XP Professional, all works very well, but in Win98 not.
>
>
>When IB and GDB in 2000Server, the connection is Ok.
>But, when IB6 installed in Win98 (name of computer is SERVER, too), with
>the same connection parameters, canĀ“t connect.
>The messages:
> ISC ERROR CODE:335544721
>Unable to complete a network to host 'server'
>Unable to complete a connection.
>
>I change protocol to cpTCP_IP (and cpNETBEUI), without success.
>The Win98 computer can accept \\server\silojaw, when working with
>Paradox.

That is because Paradox is not a database server, but a file-sharing system.

>
>Of course, I need to instal this app in Win98, for some very small
>clients.

Win98 is not a Windows server platform and has no capability to be a Named
Pipes (cpNETBEUI) host. However, it *can* be a TCP/IP host, provided you
have properly installed TCP/IP on both the host machine and the client
machines.

Your settings are a mixture of different protocols and could never work on
any platform: see comments inline

>My Database connection:
> DataBaseSilojaw.Params.Clear;
> DatabaseSilojaw.Username := 'SYSDBA';
> DatabaseSilojaw.Password := 'masterkey';
> DataBaseSilojaw.Params.Add('PATH=\\server\silojaw');

PATH is always the absolute path to the database file, as seen by the
host. Assuming the name of the database file is "silojaw.gdb" and it is
located on drive D in a directory named "data":

D:\data\silojaw.gdb

This absolute path must be the PATH setting for any protocol.

> DatabaseSilojaw.CharSet := 'WIN1252';
> DatabaseSilojaw.Server := 'server';

On Win98 you must add an entry to c:\Windows\HOSTS to identify
"server". You must know the IP address of the machine's NIC card in your
local network.

Say the IP address is 10.12.13.5, in the HOSTS file, add this entry:

10.12.13.5 server # Host for InterBase 6

> DatabaseSilojaw.Protocol := 'cpLocal';

The protocol cpLocal is not compatible with any server entry. Provided the
database path is correct (and yours is not) and the client application is
running on the same machine as the database server, the client (gds32.dll)
will try to connect directly to the database. Remote clients can NOT
connect using this method.

Note that, while cpLocal is OK for development, it is not suitable for a
production system where multiple users are connected. Events do not work
with cpLocal, either. In product, a local user should be connected using
cpTCP_IP and the server named localhost. For this, you need an entry in
HOSTS:

127.0.0.1 localhost # TCP/IP local loopback server

> DatabaseSilojaw.Connected;

It is better programming to call the Connect method than to attempt to set
the Connected property. Test "Connected" and call "Connect":

Try
if not DatabaseSilojaw.Connected then
DatabaseSilojaw.Connect;
except
{ exception handling here }
end;

TIP: In IBO, the old BDE Params property is there just for
compatibility. Use the IBO connection properties directly and IBO will
take care of setting the correct connection string:

IBO connection properties are:

Path
Server
Protocol
Charset
Username
Password
and also
PasswordStorage - read the help for this - IBO provides five levels of
security for password storage
DatabaseName - don't set this. By default, IBO will calculate the full
connection string and write it into this property. You can change it to
something easy, like "cn" or "db" (no quote marks) and this will simplify
setting the properties on your datasets.

Helen