From: "Juan Manuel Guerrero" Organization: Darmstadt University of Technology To: yunzhang73 AT hotmail DOT com (yun zhang) Date: Fri, 12 Oct 2001 21:56:18 +0200 Subject: Re: gdbm read error CC: djgpp AT delorie DOT com X-mailer: Pegasus Mail for Windows (v2.54DE) Message-ID: <9C39B625CB9@HRZ1.hrz.tu-darmstadt.de> Reply-To: djgpp AT delorie DOT com On 11 Oct 2001, yun zhang wrote: > I'm using gdbm-1.8.0 and got error: "gdbm error: read error". Does > anybody have ideas about this failure? The code actually works fine > for the past two months and suddenly I got such error message. You do not give me very much information so I must *speculate*. I must assume that you have compiled your database application and linked it with an old and bogus version of gdbm. The serious bug of this library is that it reads and writes db files in *dos text mode* instead of *dos binary mode*. All this means that you have created broken db files using your broken application. Later you have downloaded the repaired gdbm library and recompiled your application. Now, your new application will read and write all db files written in dos text mode, in dos binary mode. This fact, probabely, originates the error message. IMHO, there are only two possibilities: 1) Try to convert your db files from text style files into binary style files using an utility like dtou.exe from djdev203.zip. I have never tried this, so I do not know if this will ever work. 2) There is no way to convert the original db files from dos text mode into dos binary mode. The db files must be recreated from scratch. Please note that I have been speculating. You have not given any information to me to reproduce the difficulty. I would need at least the timestamp of the gdbm library used to create the db files that can no longer be read. Anyway, it is *very* likely that your db files are lost and I would seriously suggest to download the actual gdbm library (timestamp: 2001-08-27) and recreate your db files from scratch. Regards, Guerrero, Juan Manuel