Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Row Hashing in Access 2010

Posted on 2014-03-18
9
Medium Priority
?
529 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
[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
  • 5
  • 2
  • 2
9 Comments
 
LVL 39

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 58
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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

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
 

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 58
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 39

Accepted Solution

by:
PatHartman earned 2000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

610 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