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