I get the error when i try to open the database!
BTOpenFileBlock(IFBPtr,FName,False,False,True,True);
The database files are placed on a network drive. There is no problem, when
they are placed on a local drive. Both pc's are running w2k. I'm not getting
the error every time, but often!
I have made the following changes to the registry! (found them on some
webpages!!)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameter
s]
"EnableOplocks"=dword:00000000
"CachedOpenLimit"=dword:00000000
"EnableOpLockForceClose"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MRxSmb\Parameters]
"OplocksDisabled"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Para
meters]
"UseOpportunisticLocking"=dword:00000000
"EnableOpLockForceClose"=dword:00000001
"EnableOplocks"=dword:00000000
Torben Thyregod
It's possible that you may be running into the infamous Windows caching
problem that can lead to lock errors, data corruption, and other problems on
networked databases. For solutions to the caching problem, take a look at
corrupt.txt, located at ftp.turbopower.com/pub/btree/corrupt.txt. Also take
a look at an article in the February, 1999 issue of The Delphi Magazine
entitled "Paradox File Corruption." You can read the article at
http://www.thedelphimagazine.com/samples/Paradox/paradox.htm. To avoid
these kinds of problems, you need to make sure that EVERY machine on your
network that will access your B-Tree Filer fileblocks is set up correctly.
I have a program called NetSafe that lets you easily check your
workstations. You can download it from here:
http://www.pcisys.net/~robr/download.htm.
--Rob [TPX]
"Torben Thyregod" <tor...@gadbjerg.dk> wrote in message
news:ulELf48V...@tpsmail01.turbopower.net...
>Could anyone explain the error 10360 to me, and give me some hints to, how I
>can solve that problem!!??
from the handbook:
error 10360: Cannot repair the dialog file because other workstations have the fileblock open
>I get the error when i try to open the database!
>
> BTOpenFileBlock(IFBPtr,FName,False,False,True,True);
Some month ago I had the same problem (see the thread "no IsamFlushDOSDia in BTUnlockFileblock =
bug?" from 01/07/02). Here is the bugfix Julian posted:
-------8<-------
Filer fix BTUnLockFileBlock doesn't force changes to dialog file
when required to
----------------------------------------------------------------------------
Assume BTForceNetBufferWriteThrough has been called with DoIt=true.
BTLockFileBlock will reduce the dialog file to 1 byte as part of its
processing and flush the data to the network drive. BTUnlockFileBlock writes
a new set of flags to the dialog file (say 54 bytes worth) but doesn't
flush the new data. Consequently other workstations can attempt to open the
dialog file only to find it's the wrong size. This only seems to happen with
certain combinations of operating system.
Alter IsamBuildAndPutFlagSetFlushNewData in ISAMNWRK.INC to force the flush:
procedure IsamBuildAndPutFlagSetFlushNewData(IFBPtr : IsamFileBlockPtr);
...
begin
...
IsamPutFlagSet(IFBPtr, FlagSet);
if (IFBPtr^.NSP = Nil) or IsamNetEmu then begin {!!.56}
IsamFlushDOSDia(IFBPtr, True); {!!.56}
end; {!!.56}
end;
-------8<-------
Hope this will solve your problem.
Torsten
> I got one more question !!
>
> In Filer.cfg :
>
> DefeatLocalCache : Boolean = False; {!!.53}
> {-True executes extra code to defeat local operating system caches
> for remote fileblock data, also makes apps slower}
>
> What am I going to do about that!! True or false ??
The DefeatLocalCache constant was a method of trying to solve the infamous
Windows caching problem, which can lead to lock errors, data corruption, and
other problems on networked databases. For more information about the
caching problem, tak e a look at corrupt.txt, located at
ftp.turbopower.com/pub/btree/corrupt.txt. Also take a look at an article in
the February, 1999 issue of The Delphi Magazine entitled "Paradox File
Corruption." You can read the article at
http://www.thedelphimagazine.com/samples/Paradox/paradox.htm.
To avoid these kinds of problems, you need to make sure that EVERY machine
on your network that will access your B-Tree Filer fileblocks is set up
correctly. I have a program called NetSafe that lets you easily check your
workstations. You can download it from here:
http://www.pcisys.net/~robr/download.htm.
If you can ensure that EVERY machine on your network that accesses your
B-Tree Filer database is configured correctly, you can leave
DefeatLocalCache set to False. But if you can't be certain that the
machines are all configured correctly, then you must set DefeatLocalCache to
True. Setting it to True will cause your application to use more memory and
run slower, so the preferred method is to make sure all of the workstations
are configured correctly. I recommend that you add some startup code to
your B-Tree Filer apps that checks to make sure the workstation is
configured correctly, and if not, to show an error message and avoid opening
the fileblocks. The "Paradox File Corruption" article that I mentioned
contains code that you can modify to perform this startup check. (The code
in the article actually changes the registry settings to the correct values.
For use as startup code in your app, you will want to modify it to only
check the settings instead of modifying them.)
--Rob [TPX]
--Rob [TPX]
"T.Halang" <T_Ha...@PegaMed.de> wrote in message
news:8fbrnu06om9nm3qah...@4ax.com...
That is exacly what is happening!! I get the error and the dia file is
sometimes 1 byte and sometimes 34 bytes!!
I tried making the change to IsamBuildAndPutFlagSetFlushNewData and then
call BTForceNetBufferWriteThrough(true) in the initialization part of my
unit, that didn't help very much!! It didn't execute the
IsamBuildAndPutFlagSetFlushNewData procedure at all!! I then placed it in
the constructor.create of my own BTreeControl class, and now it executes the
procedure!! But it still doesn't look like it helped!! There is still some
problems!!
I didn't have that much time to test it today, so I will try to check it
again tomorrow!!
I got one more question !!
In Filer.cfg :
DefeatLocalCache : Boolean = False; {!!.53}
{-True executes extra code to defeat local operating system caches
for remote fileblock data, also makes apps slower}
What am I going to do about that!! True or false ??
Torben
"T.Halang" <T_Ha...@PegaMed.de> skrev i en meddelelse
news:8fbrnu06om9nm3qah...@4ax.com...