Autor Beitrag
wurz
Hält's aus hier
Beiträge: 6

Win XP
D7 Enterprise, BDS 2006
BeitragVerfasst: Di 20.04.04 12:31 
hi!

i am about to switch from DBIsam3 to DBIsam4 and i need to upgrade my tables
to the correct format now. i have tried the DBSys utility upgrade on a version 3
table. first i am told that the table was upgraded successfully. then i am presented
the following log messages:

Zitat:
Upgrade of table x to version 4.00 started at 20.04.2004 09:44:48...
Field definitions of x upgraded to latest table version 4.00...
7 records of x upgraded to latest table version 4.00...
Index definitions of x upgraded to latest table version 4.00...
BLOB header of x upgraded to latest table version 4.00...
0 BLOB blocks of x upgraded to latest table version 4.00...
Repair of table x started at 20.04.2004 09:44:48...
Invalid field data type (Unknown) for field asdf in table header, error cannot be
fixed...
Invalid field data type (Unknown) for field dt in table header, error cannot be
fixed...
Invalid field data type (Unknown) for field integ in table header, error cannot be
fixed...
Invalid field data type (Unknown) for field jkl in table header, error cannot be
fixed...
Invalid field data type (Unknown) for field wwe in table header, error cannot be
fixed...
Invalid BLOB field count in table header, error fixed...
Repair of table x completed at 20.04.2004 09:44:48...


when i try to open the table now it says:
DBISAM Engine Error # 8961 Header information corrupt in the table 'x'

i have also written a short application to try it out directly without the dbsys
utility. using dbisam3 everything looks fine and i can open the table. using
dbisam4 it recognizes the old version number but after upgrading the table and
also after repairing it i can't open it anymore and also the verify table method
returns false! if i try to open it nonetheless i get the same old exception:

DBISAM Engine Error # 8961 Header information corrupt in the table 'x'

here is the code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
procedure TDBISAMUpgrade.btStartClick(Sender: TObject);
var
lVerNum: string;
begin
try
DBIsamDataBase := TDBIsamDataBase.Create(Self);
DBIsamDataBase.DatabaseName := 'Testdatabase';
DBIsamDataBase.Directory := 'C:\Temp\db';
DBIsamDataBase.Open;
DBIsamTable := TDBIsamTable.Create(Self);
DBIsamTable.DatabaseName := 'Testdatabase';
DBIsamTable.TableName := 'x';
lVerNum := DBIsamTable.VersionNum;
ShowMessage(lVerNum);
if lVerNum <> '4.00' then
DBIsamTable.UpgradeTable;
if not DBIsamTable.VerifyTable then
DBIsamTable.RepairTable({force index rebuild} false);
if DBIsamTable.VerifyTable then
DBIsamTable.Open
else
ShowMessage('Table is corrupted!');
finally
FreeAndNil(DBIsamDataBase);
FreeAndNil(DBIsamTable);
end;
end;


i think this should work, shouldn't it?
any idea what could be the reason?

greets,
peter.


p.s.:
probably i should also mention that i changed the constant MAX_FIELDNAME_SIZE
in dbisamcn.pas from 60 to 128, and accordingly
EmptySpace: array [1..76-(MAX_FIELDNAME_SIZE - 60)] of Byte;


p.p.s.: sorry dass ich in englisch gepostet habe, hab den selben beitrag auch in ein englischsprachiges forum gestellt ;) es kann gern auf deutsch geantwortet werden!

Moderiert von user profile iconUGrohne: Delphi-Tags inserted ;-)