Board index » delphi » corrupt index/header problem

corrupt index/header problem

Is this environment the cause of the problems we are experiencing? Pls help.

The environment:
    NT Server where the paradox 7 database files reside.
    Three (initial) PCs (up to eventual max of 15) with BDE 5.01 installed
    and configured to use a common net file ( UNC path referencing a common
    directory on the NT server ) and with the alias set to reference the
database
    directory on the NT server. The application itself (D3) also resides on
the Server.

    Here is the locale diagram
         ServerMachine
             ShareFolder
                  VendorName
                       DatabaseDirectory
                       ApplicationDirectory
    For clarity, the UNC path to the netfile looks like this
        \\ServerMachine\RemoteDB\Vendor\
    UNC path to the db looks like this
        \\ServerMachine\RemoteDB\Vendor\DB
    and the application is here
         \\ServerMachine\RemoteDB\Vendor\App\

   Users from the three PCs would invoke the application via a shortcut
pointing
   to \\ServerMachine\RemoteDB\Vendor\App\AppName.exe

   Have we effectively broken some golden rule here?  Normally, we would
have the
   app installed on the PCs. However, in this particular situation, since
this is a beta
   system, someone thought running the app from one location would ease the
bugfix/enhancement
   process without any implication. Does this scenario somehow defeat the
purpose of the
   net and lock files?

   Any inputs/suggestions would be greatly appreciated.

   Thanks a million in advance

   Kevin

 

Re:corrupt index/header problem


Your NetDir and other things all look right.  I had a similar app that ran
off of a NetWare server that had the same problem.  In the end we traced our
problem back to an AutoNumber field that was causing the problem.  When we
got rid of the AutoNumber field and made a creative solution to assigning
unique numbers it fixed the problem.  I can't be sure that this is your
situation but it is a suggestion.

Jake

Quote
"onwatch" <onwatch...@mail.com> wrote in message

news:y8m25.13320$bt1.116657@typhoon1.san.rr.com...
Quote
> Is this environment the cause of the problems we are experiencing? Pls
help.

> The environment:
>     NT Server where the paradox 7 database files reside.
>     Three (initial) PCs (up to eventual max of 15) with BDE 5.01 installed
>     and configured to use a common net file ( UNC path referencing a
common
>     directory on the NT server ) and with the alias set to reference the
> database
>     directory on the NT server. The application itself (D3) also resides
on
> the Server.

>     Here is the locale diagram
>          ServerMachine
>              ShareFolder
>                   VendorName
>                        DatabaseDirectory
>                        ApplicationDirectory
>     For clarity, the UNC path to the netfile looks like this
>         \\ServerMachine\RemoteDB\Vendor\
>     UNC path to the db looks like this
>         \\ServerMachine\RemoteDB\Vendor\DB
>     and the application is here
>          \\ServerMachine\RemoteDB\Vendor\App\

>    Users from the three PCs would invoke the application via a shortcut
> pointing
>    to \\ServerMachine\RemoteDB\Vendor\App\AppName.exe

>    Have we effectively broken some golden rule here?  Normally, we would
> have the
>    app installed on the PCs. However, in this particular situation, since
> this is a beta
>    system, someone thought running the app from one location would ease
the
> bugfix/enhancement
>    process without any implication. Does this scenario somehow defeat the
> purpose of the
>    net and lock files?

>    Any inputs/suggestions would be greatly appreciated.

>    Thanks a million in advance

>    Kevin

Re:corrupt index/header problem


On Fri, 16 Jun 2000 09:08:46 GMT, "onwatch" <onwatch...@mail.com>
wrote:

Quote
>Is this environment the cause of the problems we are experiencing? Pls help.

You didn't mention the private directory. This is where the client
machine keeps tempory tables used in various operations. It will be in
the same directory as the .exe file, if I remember correctly. Since
you don't have the app on each client, this might mean that the
private dir will end up on the server, and be shared by all clients.
If that happens, there can be occasional conflicts.

The answer is to set the private dir in the OnCreate event of one of
the first forms that is created. Set it to something like C:\temp.

This is just a stab at the problem, since I haven't run into it
myself.

HTH,
Dan

--
Dan Brennand
CMDC systems, inc.
Configuration Management and Document Control: Consulting, Software,
and the only comprehesive textbook on this subject.
visit us at www.cmdcsystems.com
[Remove the SPAM from my e-mail address]

Re:corrupt index/header problem


Part of the problem, Kevin, is that someone in the BDE design team just
didn't like to write messages.  ;-)  They tended to economize on
messages at the expense of clarity.

Literally half-a-dozen fields in the header could, if they are wrong,
produce this message.  Table Verify (by any method) will generally
produce more detailed information to allow you to ascertain what the
exact nature of the problem really is.

Re:corrupt index/header problem


Quote
"Dan Brennand" <d...@SPAMcmdcsystems.com> wrote in message

news:394a51ca.1016295609@news.dimensional.com...

Quote
> On Fri, 16 Jun 2000 09:08:46 GMT, "onwatch" <onwatch...@mail.com>
> wrote:

> >Is this environment the cause of the problems we are experiencing? Pls
help.

> You didn't mention the private directory. This is where the client
> machine keeps tempory tables used in various operations. It will be in
> the same directory as the .exe file, if I remember correctly. Since
> you don't have the app on each client, this might mean that the
> private dir will end up on the server, and be shared by all clients.
> If that happens, there can be occasional conflicts.

> The answer is to set the private dir in the OnCreate event of one of
> the first forms that is created. Set it to something like C:\temp.

> This is just a stab at the problem, since I haven't run into it
> myself.

I suspect that you are right on the money. Its also important that an
application have a different TempDir for each of its database objects.
Otherwise a single user app will experience the same problem.

Re:corrupt index/header problem


To Jake, Dan, Bruce, and Sundial Services
Thank you all very much for taking your valuable time to help.

Jake:  Interesting enough, we do have an autoincrement field in the
corrupted
table.  Nevertheless, its purpose is only to provide a chronological order
of
the records that were input...and it's not indexed.

Dan, Bruce:  I appologize for not having left the following part out ..
The main screen of our app assigns the session.onstartup to a method which
sets the session.netfiledir to the windows temp directory (gettemppath).

Sundial Services: Couldn't agree with you more ;-)

P.S.  Please correct me if I'm wrong.  Apart from the net and lock files,
the
main reason the db engine is able to keep concurrent database access in
check
is due to the different unique sessions that are simultaneously toying with
the
database.  This is why multi-threaded database app needs a unique session
for each running thread, right.  If that is true, then how many distinctable
sessions
actually exists in the environment I described?  Only one, I think.  I don't
know
how the bde distinguishes among the different default session from different
PCs,
most likely through the pc's name on the network, or the MAC address
...Whatever
it is, it has to be unique to the network, right?...wrong?...I don't
know...It's Friday....
I guess we can always return to the customer's site, install the app onto
each
user's PC...then wait and see if that would make a difference...

I would certainly welcome any additional inputs on the matter.

Many thanks again...

Quote
onwatch <onwatch...@mail.com> wrote in message

news:y8m25.13320$bt1.116657@typhoon1.san.rr.com...
Quote
> Is this environment the cause of the problems we are experiencing? Pls
help.

> The environment:
>     NT Server where the paradox 7 database files reside.
>     Three (initial) PCs (up to eventual max of 15) with BDE 5.01 installed
>     and configured to use a common net file ( UNC path referencing a
common
>     directory on the NT server ) and with the alias set to reference the
> database
>     directory on the NT server. The application itself (D3) also resides
on
> the Server.

>     Here is the locale diagram
>          ServerMachine
>              ShareFolder
>                   VendorName
>                        DatabaseDirectory
>                        ApplicationDirectory
>     For clarity, the UNC path to the netfile looks like this
>         \\ServerMachine\RemoteDB\Vendor\
>     UNC path to the db looks like this
>         \\ServerMachine\RemoteDB\Vendor\DB
>     and the application is here
>          \\ServerMachine\RemoteDB\Vendor\App\

>    Users from the three PCs would invoke the application via a shortcut
> pointing
>    to \\ServerMachine\RemoteDB\Vendor\App\AppName.exe

>    Have we effectively broken some golden rule here?  Normally, we would
> have the
>    app installed on the PCs. However, in this particular situation, since
> this is a beta
>    system, someone thought running the app from one location would ease
the
> bugfix/enhancement
>    process without any implication. Does this scenario somehow defeat the
> purpose of the
>    net and lock files?

>    Any inputs/suggestions would be greatly appreciated.

>    Thanks a million in advance

>    Kevin

Re:corrupt index/header problem


Quote
"onwatch" <onwatch...@mail.com> wrote in message

news:e0G25.24810$Y4.147972@typhoon2.san.rr.com...

Quote
> To Jake, Dan, Bruce, and Sundial Services
> Thank you all very much for taking your valuable time to help.

> Jake:  Interesting enough, we do have an autoincrement field in the
> corrupted
> table.  Nevertheless, its purpose is only to provide a chronological order
> of
> the records that were input...and it's not indexed.

> Dan, Bruce:  I appologize for not having left the following part out ..
> The main screen of our app assigns the session.onstartup to a method which
> sets the session.netfiledir to the windows temp directory (gettemppath).

NO. All stations have to run with NetFileDir pointing to the same physical
location. All sessions must have their PrivateDir pointing to a different
physical location. E.G.

Session1.NetFileDir := '\\ServerName\AppDataDir\NetDir';
GetTempPath (n, tmpPath);
Session1.PrivateDir := tmpPath + 'Session1';

Session2.NetFileDir := '\\ServerName\AppDataDir\NetDir';
Session2.PrivateDir := tmpPath + 'Session2';

Re:corrupt index/header problem


Dear Bruce,

Sorry, I totally messed up with the last post ... Told you it was Friday....
LATE Friday ...hehe...

What I meant to say was that

"The main screen of our app assigns the session.onstartup to a method which
sets the session.privatedir to the windows temp directory (gettemppath)..."

This part is from the first post:

    For clarity, the UNC path to the netfile looks like this
        \\ServerMachine\RemoteDB\Vendor\  (done through BDECfg32)
    UNC path to the db looks like this
        \\ServerMachine\RemoteDB\Vendor\DB
    and the application is here
         \\ServerMachine\RemoteDB\Vendor\App\

Thanks

Quote
Bruce Roberts <no.junk.please....@attcanada.net> wrote in message

news:dzP25.11342$qS3.29398@tor-nn1.netcom.ca...
Quote

> "onwatch" <onwatch...@mail.com> wrote in message
> news:e0G25.24810$Y4.147972@typhoon2.san.rr.com...
> > To Jake, Dan, Bruce, and Sundial Services
> > Thank you all very much for taking your valuable time to help.

> > Jake:  Interesting enough, we do have an autoincrement field in the
> > corrupted
> > table.  Nevertheless, its purpose is only to provide a chronological
order
> > of
> > the records that were input...and it's not indexed.

> > Dan, Bruce:  I appologize for not having left the following part out ..
> > The main screen of our app assigns the session.onstartup to a method
which
> > sets the session.netfiledir to the windows temp directory (gettemppath).

> NO. All stations have to run with NetFileDir pointing to the same physical
> location. All sessions must have their PrivateDir pointing to a different
> physical location. E.G.

> Session1.NetFileDir := '\\ServerName\AppDataDir\NetDir';
> GetTempPath (n, tmpPath);
> Session1.PrivateDir := tmpPath + 'Session1';

> Session2.NetFileDir := '\\ServerName\AppDataDir\NetDir';
> Session2.PrivateDir := tmpPath + 'Session2';

Re:corrupt index/header problem


Quote
"onwatch" <onwatch...@mail.com> wrote in message

news:ALl35.13673$bt1.124544@typhoon1.san.rr.com...

Quote
> Dear Bruce,

> Sorry, I totally messed up with the last post ... Told you it was
Friday....
> LATE Friday ...hehe...

Friday's are always willing to take the blame ;). I should have remembered
your original post where you clearly specified the net dir setting.

Some other thoughts:

The alias paths are not all specified either in UNC form or using the same
drive letter and drive mapping.

The table got corrupted when it was copied/created and the problem has not
been fixed. If you are using tUtil then its quite possible that the
corruption is not being detected or fixed by it. (I just experienced this at
a client site.) A quick solution is to re-create the file. Another option is
a product like ChimneySweep
(http://www.sundialservices.com/products/index.htm) which claims to be able
to detect and repair many more problems.

Re:corrupt index/header problem


Perhaps this is too low tech , but i recently got this error message because
of trying to open a paradox file with a TTable whose file format was set to
ttDBase..

Boris Ingram

Quote
onwatch wrote in message ...
>Is this environment the cause of the problems we are experiencing? Pls
help.

>The environment:
>    NT Server where the paradox 7 database files reside.
>    Three (initial) PCs (up to eventual max of 15) with BDE 5.01 installed
>    and configured to use a common net file ( UNC path referencing a common
>    directory on the NT server ) and with the alias set to reference the
>database
>    directory on the NT server. The application itself (D3) also resides on
>the Server.

>    Here is the locale diagram
>         ServerMachine
>             ShareFolder
>                  VendorName
>                       DatabaseDirectory
>                       ApplicationDirectory
>    For clarity, the UNC path to the netfile looks like this
>        \\ServerMachine\RemoteDB\Vendor\
>    UNC path to the db looks like this
>        \\ServerMachine\RemoteDB\Vendor\DB
>    and the application is here
>         \\ServerMachine\RemoteDB\Vendor\App\

>   Users from the three PCs would invoke the application via a shortcut
>pointing
>   to \\ServerMachine\RemoteDB\Vendor\App\AppName.exe

>   Have we effectively broken some golden rule here?  Normally, we would
>have the
>   app installed on the PCs. However, in this particular situation, since
>this is a beta
>   system, someone thought running the app from one location would ease the
>bugfix/enhancement
>   process without any implication. Does this scenario somehow defeat the
>purpose of the
>   net and lock files?

>   Any inputs/suggestions would be greatly appreciated.

>   Thanks a million in advance

>   Kevin

Other Threads