Board index » delphi » Tutility 2.52 deletes table

Tutility 2.52 deletes table

  Tutility 2.52 (16-bit) deletes corrupted table

  I donwloaded tutility example from www.borland.com. It worked
fine until I changed tutility.dll to latest version (2.52).
  Now it just deletes corrupted table and returns an error
"File not found".
  May be somebody has any idea about this behavior of
tutility.dll

 Max Sorokin   tops...@glasnet.ru

 

Re:Tutility 2.52 deletes table


Max,

There was a change made in the 2.52 version (undocumented, as far as I
can tell) which requires that the various table names include their
extension when used in a call to the TURebuildTable routine. Here is
snippet of code from Logic Process' SelfCheck Data Maintenance API
(the "DBRebuildTable" routine):

  { check for version for BDE 2.52 ... Paradox 7 }
  if (VersionInfo.LSDW_LSW = 52) then
  begin
    DBRslt := TURebuildTable(FBDEUtil.vhTSes,
                                              NeedsExt(TablePath),
                                              TableType,
                                              NeedsExt(BackupTblName),

NeedsExt(KeyViolTblName),

NeedsExt(ProblemTblName),
                                              @TblDesc);
  end
  else
  begin
    DBRslt := TURebuildTable(FBDEUtil.vhTSes,
                                              KillExt(TablePath),
                                              TableType,
                                              KillExt(BackupTblName),
                                              KillExt(KeyViolTblName),
                                              KillExt(ProblemTblName),
                                              @TblDesc);
  end;

As you can ascertain, the DLL version is checked looking for the 2.52
version. If found, the TURebuidTable call is made with table names
that include the extension ... otherwise, the extensions are omitted.
The "NeedsExt" and "OmitExt" are simple routines that do what you
might expect -- append or truncate the table extension, respectively.
Perhaps this is what is causing your table deletion problem.

There are a number of these "gotchas" which you will encounter as you
get into the world of Paradox table maintenance. If you are interested
in saving a bit of time in exchange for a reasonable license fee
(i.e., "buying 3rd party developement tools"), then I would encourage
you to check out our DataSentry Data Maintenance Utility and SelfCheck
Data Maintenance API products.

I won't go into great detail here except to say that DataSentry is a
great Win95/WinNT4 Paradox table maintenance utility modeled visually
after Borland's Database Explorer. The SelfCheck API is a set of
routines (with full source) which can ease the task of integrating
Paradox table maintenance into your 16-bit or 32-bit Delphi apps. Apps
developed using SelfCheck can be distributed (object code)
royalty-free.

If you are interested, read more about DataSentry and the SelfCheck
API, and download the free full-featured trial version from
http://www.logicprocess.com.

Good luck,

Jim McCullin
Logic Process Corporation
sa...@logicprocess.com
www.logicprocess.com

Jim

On Fri, 14 Nov 1997 13:28:23 +0300 (WSU), Maxim B. Sorokin

Quote
<tops...@glas.apc.org> wrote:
>  Tutility 2.52 (16-bit) deletes corrupted table

>  I donwloaded tutility example from www.borland.com. It worked
>fine until I changed tutility.dll to latest version (2.52).
>  Now it just deletes corrupted table and returns an error
>"File not found".
>  May be somebody has any idea about this behavior of
>tutility.dll

> Max Sorokin   tops...@glasnet.ru

Re:Tutility 2.52 deletes table


Mike,

Thanks for the warning!

Jim McCullin

On 17 Nov 1997 09:17:03 -0700, news-re...@sundialservices.com (Sundial

Quote
Services) wrote:

>Jim, the problem turns out to be more complicated than this.  When you put
>WinNT 3.5 into the picture some odd things can still happen no matter what you
>do with the extensions.  TUTIL16/32 can still wipe out the table; it's a bug
>in their code.

>I suspect that it must have something to do with the renaming step that tries
>to squirrel away the old table before fixing it, but it baffles me why they
>would be opening the files with anything but read-only access after performing
>that rename.

>-Mike Robinson
> Sundial Services
> http://www.sundialservices.com/        <-- click here!

Other Threads