Advertisement

05.20.2008 at 01:08PM PDT, ID: 23418678
[x]
Attachment Details

Pervasive SQL / Btrieve reuses deleted autoincrement key

Asked by igams in Btrieve 4GL Database, Databases Miscellaneous

Tags: ,

I thought that AUTOINCREMENT key (called IDENTITY in SQL) should be unique and once deleted it can not reappear again. But that is exactly what is happening to me now.

In one of Pervasive older manuals I found:
"When you delete a record containing an AUTOINCREMENT key, the MicroKernel completely removes the record from the file. The MicroKernel does not reuse the deleted key value unless you specify that value when you insert another record into the file, or unless you deleted the record with the highest value."

I remember that the things were behaving like that once upon a time, but now I can not force Btrieve to forget the deleted AUTOINCREMENT key - the next inserted record will get the previously deleted one!
Or I am missing something in the configuration settings?

I have found the same behavior under 9, 9.5 and 10 versions of Pervasive SQL.

Is there a way to force the engine to use unique keys?

Start Free Trial
[+][-]05.20.2008 at 04:24PM PDT, ID: 21611126

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 12:41PM PDT, ID: 21618354

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 01:12PM PDT, ID: 21618623

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Btrieve 4GL Database, Databases Miscellaneous
Tags: Pervasive, Btrieve
Sign Up Now!
Solution Provided By: mirtheil
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628