Solved

Row Hashing in Access 2010

Posted on 2014-03-18
9
491 Views
Last Modified: 2014-03-29
I want to create a hash from the contents of each row in a MS Access 2010 table.  The hash value will be used to de-dupe the content and to screen batch updates to the table.  I'm looking for something that could be plugged into the on_click event of a button, or made part of the update SQL statement.  I'm not a VBA programmer, so I'd like something very simple, or with an example that I could clone/repeat.
0
Comment
Question by:KBreedlove50
  • 5
  • 2
  • 2
9 Comments
 
LVL 34

Expert Comment

by:PatHartman
ID: 39938127
I don't see how the hash would help you.  It seems like adding an autonumber PK would have the same effect if you just want something to make the rows unique.
0
 

Author Comment

by:KBreedlove50
ID: 39938213
That won't tell me if the contents are unique.  That's why I want to hash the row contents and store the result IN the row to compare against new rows being uploaded from external sources.  I was able to do this with Access 2007, I believe, but that MD5 algorithm does not seem to be supported in Access 2010.
0
 
LVL 57
ID: 39938408
<<I believe, but that MD5 algorithm does not seem to be supported in Access 2010. >>

  No reason why not.  MD5 is not something built-in, but rather an add-on, and 2007/2010 are not all that different.

  If you have something working in A2007, it should work fine in 2010, unless you have the 64 bit edition of Office.   If you do, that just means you'd need to modify the calls for 64 bit (assuming your not accessing an external DLL).

Jim.
0
 

Author Comment

by:KBreedlove50
ID: 39938675
I'm pretty sure I was not accessing an external DLL, but I'll have to check.  I think that I tried it and it didn't work, but I'll have to go back to it and try again.  Thanks for the info.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:KBreedlove50
ID: 39939299
I looked up what I had used in an Access 2003 or 2007 app and found this:

Private Sub cmd_Hash_Click()
    SourceHash = md5(Nz(SourcePath, "None"))
End Sub

I used the SourceHash line in a query in both Access 2007 and 2010 and got na "Undefined function MD5 in expression" error message.  I created a command button in a form, referencing an input field and got the same error message.

Unfortunately, it will be later today before I can access the app and confirm this is what I used.

Any more suggestions?
0
 
LVL 57
ID: 39939362
md5() is a function that is added to the database.

What it sounds like is that it's simply missing from your current DB or you may have broken references.

As I mentioned, the MD5 hash is not something built-in, but needs to be added.

Open the DB, compile it, and see what the problems are.

Jim.
0
 

Author Comment

by:KBreedlove50
ID: 39947750
I just tried it in another, Access 2013, DB and I got the same result.  Thanks for the help.
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39948175
Search the A2007 database for a module that contains the MD5 function.  If you don't find it, you need to go back to the original database and check the references.  There may be a reference to a library database where that function is housed.
0
 

Author Closing Comment

by:KBreedlove50
ID: 39963716
thanks for all the help and advice.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

863 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now