Jahnavi
Jahnavi

Reputation: 27

how to give a version to mdb files

I am using a .mdb file as a database for a dialog based application. For the each Release I want to give a version to the mdb file if there are more entries added. using C++ i want to read the version and display it in the application.

Can you please tell me if it is possible to give a version to mdb file ?

Upvotes: 0

Views: 200

Answers (3)

user783388
user783388

Reputation:

There is no easy way to do that and its probably best to do it as a db.property like @Gustav proposed.

If for some reason it is important to have a version information that you can read without opening the file as access file there are still some options:

  • There is the Windows Shell Property System that I think allows you to add Properties to every File/Folder.
  • You could change the Creation Date for the file to fit your need.
  • You could perhaps even read/change the file content itself in a binary stream if you research it thouroughly enough.
  • and you can of course have an external .txt (or .ver or whatever) file that you update automatically from the db.property whenever you open the db.

Upvotes: 0

Gustav
Gustav

Reputation: 55806

You can create a custom property:

db.CreateProperty("VersionId", dbText, "1.0.0")

then add this to the database, but there is no way to read this without opening the database file.

Upvotes: 1

Sergey S.
Sergey S.

Reputation: 6336

You can add a table to MDB and track releases there. If MDB should change release number automatically after some data changes, you can use Data Macro (this is for Access 2010+)

Upvotes: 1

Related Questions