1. edb problem
- Posted by Vlado Kusnirak <vkusnirak at sk.uss.com> Nov 15, 2006
- 553 views
Hi, I have small edb database and it has two records with the same key. How it could happen? I use Euphoria 3.0.0. Thanx Vlado
2. Re: edb problem
- Posted by Robert Craig <rds at RapidEuphoria.com> Nov 15, 2006
- 550 views
Vlado Kusnirak wrote: > Hi, I have small edb database and it has two records with the same key. How > it could happen? I use Euphoria 3.0.0. This problem has never been reported before, so the following questions come to mind... Have you ever used FTP to transfer your .edb file? Have you ever loaded your .edb file into a text editor and saved it? Have you ever tried to manipulate the .edb file directly using your own program, and Euphoria's open()? I just added the following warning to database.htm: .edb files are binary files, not text files. You *must* use BINARY mode when transferring a .edb file via FTP from one machine to another. You must also avoid loading a .edb file into an editor and saving it. If you open a .edb file directly using Euphoria's open(), which is not recommended, you must use binary mode, not text mode. Failure to follow these rules could result in 10 (line-feed) and 13 (carriage-return) bytes being changed, leading to subtle and not-so-subtle forms of corruption in your database. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: edb problem
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Nov 16, 2006
- 539 views
On Wed, 15 Nov 2006 15:45:06 -0800, Vlado Kusnirak <guest at RapidEuphoria.com> wrote: >Hi, I have small edb database and it has two records with the same key. How it >could happen? I use Euphoria 3.0.0. That could easily happen if you have more than one program updating the database at the same time. Make sure you always open databases with DB_LOCK_EXCLUSIVE. Regards, Pete
4. Re: edb problem
- Posted by Vlado Kusnirak <vkusnirak at sk.uss.com> Nov 16, 2006
- 551 views
Pete Lomax wrote: > > On Wed, 15 Nov 2006 15:45:06 -0800, Vlado Kusnirak > <guest at RapidEuphoria.com> wrote: > > >Hi, I have small edb database and it has two records with the same key. > How it could happen? I use Euphoria 3.0.0. </font></i> > That could easily happen if you have more than one program updating > the database at the same time. Make sure you always open databases > with DB_LOCK_EXCLUSIVE. > I think you can be right. There was lock type DB_LOCK_NO. But... There are two programs, which share this database on the same PC, but after using of data I always close database. Programs use this database only by user input, so user have to press button once in one programm and once in second program to save data. Vlado/SK