Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

Deleting A Record.

Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to SCJD Requirement
// Creates a new record in the database (possibly reusing a
// deleted entry). Inserts the given data, and returns the record
// number of the new record.

which means that while creating a new record, we can search the first deleted entry and update it with the new record information. This means we can be sure that our database file is not ever increasing in size.

But what I get is suppose I have this entry
Suppose 34 indicates valid record and 85 denotes an invalid record.
34 Data1 Data2 Data3
now to delete it I need to change it to
85 Data1 Data2 Data3
How do I make dynamic change to this file. Cos in all the API's in APPEND mode we can only add some content at the end of file.

Similarly when adding a new record suppose we need to find the first deleted record and update it with new one. Again the question of replacement comes?

Is there any API in package to accomplish it without creating some temporary file?

Animesh Saxena
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please keep to one problem, one topic.
Continue here
[ March 17, 2006: Message edited by: Barry Gaunt ]
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic