PDA

View Full Version : Source file checksum: How to compute?



jordanbk
10-25-2010, 10:04 AM
Hi,

I am wondering how to calculate the checksum for a VBA source file (e.g. .ACF form object). We're using Access 2003, and once in a while I need to merge source files that have changes to different controls (positioning or other parameters). So we export to TFS and the changes can be merged from there. But also at times we do manual merging. Sometimes I also want to be able to just edit the control options in a source file directly, without using Access or VBA, then check it back into TFS. (Later we run a build process that reads individual source files from TFS and creates an MDE from them.)

One of the developers here told me that the checksum is computed from the text of the control metadata (first half of the file) plus the source code itself, and if it doesn't match then VBA won't accept the source file. Is this true? Can I simply remove the checksum and will VBA add it back in?

Or if not, is there a way I can recalculate it? Are they using an MD5 hash, a CRC or a plain old checksum? And if I compute the checksum on the whole file, then add the checksum into the file, it will throw off the checksum!! Kind of a catch-22.

Just for clarity, I'm referring to the "Checksum=" line at the top of each source file.

Please advise... Thanks!

Jordan