Board index » delphi » Problem sharing table with BDE 5.1, Win 2000, and Win 98

Problem sharing table with BDE 5.1, Win 2000, and Win 98

Hi,

I have a simple "test" application that consistently fails under the
following circumstances:

(The table in question is a simple Paradox level 5 table that is known
good).

I run the app from a Win 98 station.  It opens a table on another Win 98
station on the network (10-BaseT LAN; 4 stations; low/no traffic).  It
simply reads the last record in the table and the data-aware edit box shows
a field from that table to prove the read occurred.

That's always fine.  However, if I leave the app open on Win 98, and I
launch a copy of the same EXE from a Win 2000 station (both have BDE 5.1
installed), the Win 2000 copy pauses for a few seconds while loading, then
issues a "Cannot access directory" error.

Now I know the Win 2000 system has complete access to the shared data
directory on the machine where the data files exists. Here's the worst part:

If I then close both apps, restart the app on the Win 2000 station only, it
runs and reads the record fine!  I can then open the Win 98 app and it will
also read the record (sharing the table) just fine!   That is, only when I
start the app on the Win 98 station first, and try to then run it from the
Win 2000 station does the error occur.  The Win 2000 station *can* run
perfectly if no other station runs the app, and also when it accesses the
app first, then the Win 98 station accesses it second.

Anyone else seen anything like this, or have any clues about what it could
be???  I don't think it's a permissions thing (even though the error message
seems to think so) because the app will run from Win 2000 as long as the
table is not already opened by another station.  Sounds like some funkyness
with sharing and the BDE and Win 2000.

Any suggestions?

Thanks in advance,
Vinnie Murdico

=============== SOURCE CODE FOR TEST APPLICATION =============
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Db, DBTables, StdCtrls, Mask, DBCtrls;

type
  TForm1 = class(TForm)
    Table1: TTable;
    DataSource1: TDataSource;
    DBEdit1: TDBEdit;
    procedure FormActivate(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormActivate(Sender: TObject);
begin
     Table1.DatabaseName := '\\filesrvr\d\data';
     Table1.TableName := 'atable.db';
     Table1.Active := True;

     Table1.Last;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
     Session.NetFileDir := '\\filesrvr\d\data';
end;

end.

 

Re:Problem sharing table with BDE 5.1, Win 2000, and Win 98


Hi Bill,

After D.Fedorov's post above, I updated my test app to explicitly set
PrivateDir to a "local" directory (C:\TEMP) on each system.  I made sure
each C: had a \TEMP directory, then copied the EXE to each station's C:
drive and ran each one seperately.  Since I was always running seperate EXEs
from each station, it should have been ok even in the original version of
the test app (without the PrivateDir), since Borland says if no specific
PrivateDir is specified, it will use the EXE directory as the PrivateDir,
and I always ran two distinct copies of the EXE - one locally on each
machine.  But I did try setting it just to make sure.

The reason I keep leaning toward Win 2000 as the probable culpret is because
the exact same scenario that causes the error on Win 2000 runs perfectly
when I substitute NT4 for the Win 2000 station.  Or, if I run two Win 98
stations it's also fine.  Only when running from Win 2000 does the problem
occur. The other strangeness is that I can launch the Win 2000 EXE first and
the 98 EXE can then also open the table.  It's only when Win 98 opens it
first, and Win 2000 then tries to open it does it get the error.

So, I'm really confused.  I sent a "reproducible bug report" to Borland
through their web site, but I haven't even gotten an autoresponder message
telling me they got it!  At this point, I'd be grateful just to know someone
else can dupe this or has seen it before.

Thanks for your response.
--
Vinnie Murdico
Software with Brains, Inc.
http://www.softwarewithbrains.com

"Bill Todd (TeamB)" <b...@dbginc.com> wrote in message
news:88kmkp$qur21@bornews.borland.com...

Quote
> Is the EXE being loaded from the file server? If so, the problem is that
> both workstations are trying to use the startup directory as their private
> directory. Try assigning a unique private directory (a directory on the
> local hard drive works well for this) . Use

> Session.PrivateDir := 'c:\bdepriv';

> --
> Bill

> Bill Todd (TeamB)
> (TeamB cannot respond to questions received via email)

Re:Problem sharing table with BDE 5.1, Win 2000, and Win 98


Hi Bill,

I submitted this to the Borland Bug Report form on their site.  Got a reply
back Friday night.  Seems they have at least reproduced it (always a
bonus!).  Of course, no promises on when they'll be able to offer a
workaround or patch... <g>  I'll keep my fingers crossed.

Thanks...
-- Vinnie M.

============= FROM BORLAND SUPPORT ============
FROM: qwildman

Dear Vinnie,

Thank you for your bug submission. I have reproduced your problem and
submitted the problem to R&D.

Thanks for your time and interest in Inprise/Borland products.
=================================================

Re:Problem sharing table with BDE 5.1, Win 2000, and Win 98


Hi Vinnie,

I'm having the same problem and you don't even have to use Delphi to
reproduce it.  The problem even occurs using the Database Desktop that
came with D5.  If you open the table on the Win 2000 machine first
there's no problem opening it on the Win98 machine.  But if you open
it on the Win98 machine first, you get "Unable to open table" when
you try to open the table on the Win2000 machine.  The additional
information that it shows when you click on the ">>" button is "Not
exact read/write.  File: F:\TEST\PDOXUSRS.LCK".  F:\TEST is the
NET DIR on both machines set up in the BDE Administrator and in the
Database Desktop the Private Directory is set to the local directory
"C:\Program Files\Borland\Database Desktop\PrivDir" on both
machines.  I tried the latest BDE 5.11 update and the problem stil
occurs.

I'm glad that Borland has reproduced the problem because I suspect
that a lot of us are going to start having to deal with this problem
very soon as customers begin to install Win 2000.  I'm keeping my
fingers crossed that Borland will have a solution before this becomes
a major support issue.

-Rich Walker
r...@texas.net

Quote
"Vinnie M." <vin...@softwarewithbrains.com> wrote:
>Hi Bill,

>I submitted this to the Borland Bug Report form on their site.  Got a reply
>back Friday night.  Seems they have at least reproduced it (always a
>bonus!).  Of course, no promises on when they'll be able to offer a
>workaround or patch... <g>  I'll keep my fingers crossed.

>Thanks...
>-- Vinnie M.

>============= FROM BORLAND SUPPORT ============
>FROM: qwildman

>Dear Vinnie,

>Thank you for your bug submission. I have reproduced your problem and
>submitted the problem to R&D.

>Thanks for your time and interest in Inprise/Borland products.
>=================================================

Re:Problem sharing table with BDE 5.1, Win 2000, and Win 98


Problem in BDE ?

We have a problem with the sortorder in a DBGrid in the following situation:
- Database Oracle 7.3.4.
- a DBGrid with a Table-Component as the dataset
- BDE 5.01. (5.10)
- C++ Builder 4.0

The Table has a primary key of char(2),
the data are like '50', '51', '54', '8F', 'C1', 'C4',  ...
The sortorder should be like in the upper line and the Cursor in DBGrid
should be
at position of record with the '50' after starting the program.

If I start the programm the sortorder is right, but the cursor is at
position of record
'C1' and all records, beginning with a number are dublicat displayed in the
grid after
the record beginning with a character.

If I posit the cursor at Record '50' and refresh the dataset, the sortorder
change to
'50', 'C1', 'C4', '51', '54', '8F' and no record is duplicate displayed.
If I want to edit a record, beginning with a character, I got the
errormessage
8708 Record/Key deleted. After sorting in correct order by posit cursor at
record 'C1' and
refresh, this errormessege dosn't occure.

I have the problem in all tables with primary key of the type char(xx) and
data witch
begins either with a number or a character.

The same problem is observed in the SQL-Explorer.

How I can solve this problem ?

Please send E-Mail to Lutz.Huebschm...@Eisenmann.de

Other Threads