Subject | Re: still have slow connection |
---|---|
Author | Dixon Epperson |
Post date | 2003-09-17T17:36:05Z |
Alexandre,
I finally discovered where the hold up was. It wasn't in the DNS, or
IP address or even in setting the host file, though I tried them all.
A little background first.
I use delphi7, and I use a centralized configuration file for access
control. This cfg file is in the same folder as the database and is
pointed to by the programs ini file. The cfg file is encrypted and
the way I would write it in delphi is something like this:
type
TSecureParms = Record
Prot : Integer;
sName : String[255];
rPwd : String[255];
end;
then when I start my program, for this particular type of file I use
the assign method
example
var
F: File of TSecureParms;
fSecureParm : TSecureParms;
sFilePath : string;
begin
...
AssignFile(f, sFilePath);
Reset(F);
if not EOF(F) then
Read(F, fSecureParm);
CloseFile(f);
...
end;
It was apparently this AssignFile call that was causing Win98 to be
so slow loading the database. I moved this cfg file to the local
client, and instead of using the alias, I used the full datapath and
voila!!! It works. Or at least it seems to.
I suspect that when the Win98 machine got the file handle from the XP
Pro machine the first time, as in when it first booted, it was able
to read the instruction set and move quickly to the database. But
somehow, it either never released the handle, or the Win XP Pro
thought it still had the file outstanding and wouldn't give it access
the second and subsequent times, so my program would simply wait
until it times out.
I am not sure whether the issue was in my assignFile or in Firebird
reading the Alias.conf. I haven't pursued it that far.
btw, my data folder where the database and this file are located are
shared on the network. I'm assuming that these need to be shared so
my clients apps can read / write to the database. is that correct?
Dixon
I finally discovered where the hold up was. It wasn't in the DNS, or
IP address or even in setting the host file, though I tried them all.
A little background first.
I use delphi7, and I use a centralized configuration file for access
control. This cfg file is in the same folder as the database and is
pointed to by the programs ini file. The cfg file is encrypted and
the way I would write it in delphi is something like this:
type
TSecureParms = Record
Prot : Integer;
sName : String[255];
rPwd : String[255];
end;
then when I start my program, for this particular type of file I use
the assign method
example
var
F: File of TSecureParms;
fSecureParm : TSecureParms;
sFilePath : string;
begin
...
AssignFile(f, sFilePath);
Reset(F);
if not EOF(F) then
Read(F, fSecureParm);
CloseFile(f);
...
end;
It was apparently this AssignFile call that was causing Win98 to be
so slow loading the database. I moved this cfg file to the local
client, and instead of using the alias, I used the full datapath and
voila!!! It works. Or at least it seems to.
I suspect that when the Win98 machine got the file handle from the XP
Pro machine the first time, as in when it first booted, it was able
to read the instruction set and move quickly to the database. But
somehow, it either never released the handle, or the Win XP Pro
thought it still had the file outstanding and wouldn't give it access
the second and subsequent times, so my program would simply wait
until it times out.
I am not sure whether the issue was in my assignFile or in Firebird
reading the Alias.conf. I haven't pursued it that far.
btw, my data folder where the database and this file are located are
shared on the network. I'm assuming that these need to be shared so
my clients apps can read / write to the database. is that correct?
Dixon