?
Solved

auto numbering and backups

Posted on 2009-07-12
5
Medium Priority
?
157 Views
Last Modified: 2012-05-07
I am trying to add numbering to the next release of my app for Invoices, Proposals, customer numbers etc. I can put them in a database and have the database auto increment or put them into a file and have code do the increments. My app has the ability to do backups and restores. how can i be sure the numbers are valid on a restore if the customer has created new documents ?
0
Comment
Question by:isnoend2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 42

Expert Comment

by:dqmq
ID: 24835188
In my vernacular a restore puts everything back the way it was at the time of backup.  So, if the numbers were good when they were backed up, then they are good when they are restored.

Perhaps you mean something else.  Can you give an example of how a number might go bad?
0
 

Author Comment

by:isnoend2001
ID: 24835439
My app produces roof estimates that are saved as a random access file. When saved it saves roofprice, and a lot of other information including document numbers
Example:
 Backup Invoice number is 5500
User creates more invoices current number is now 5510
customer does a restore Number is put back to 5500
This means that 10 numbers have been used
0
 
LVL 42

Expert Comment

by:dqmq
ID: 24837107
It's the responsibility of the Restore process to sync everything up.  If you are restoring backward in time, then you need to delete the invoices created after that point to remain in sync.   If you want to roll foward to a point in time, then you need to update the counter to that point in time.  These are the sort of things databases do extremely well and with a mimimum of fuss.  You are at a disadvantage storing your estimates in random access files.  

You might consider keeping a database cross-reference to your random access files.  
0
 

Author Comment

by:isnoend2001
ID: 24837298
In my situtation is is not feasible to storethe random access  data in a database. I random access is i estimate and contains upto 5 richtexboxs, wirth pictures, 8 mshflexigrid data and many more objects. I have found that database is not the place to store objects. I have desided to do this: On the restore check
if the numbers are less on the file to restore. The file looks like this:
Bid Number=1001
Proposal Number=2001
Change Order Number=4001
Invoice Number=3001
Certificate Number=5001
Not restore the file if the numbers are the same
0
 
LVL 42

Accepted Solution

by:
dqmq earned 2000 total points
ID: 24840388
> I have found that database is not the place to store objects.
 
DB's are getting better, but I won't dispute that.  On the otherhand, databases are good for storing a cross-reference to the files and the relationships between them.  For example, you might have a Bid table that merely contains the bid number, status, and the path to the file where the bid is stored.  That way, the next bid number is always max(BidNo) +1.  

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question