Detecting Duplicate Image Data Types
Posted on 2009-07-08
I am using an "image" data type column to store files inside a database. Its normalized to a document record which other records can reference as a foreign key. A document should not occur twice in that table
Therefore, once an image is in there, I dont want to upload a duplicate.
Is there a way of comparing the first 8000 bytes so I can say
"select DocumentID As PossibleDuplicate
Where left(myimagefield, 8000) = " & quote(strMyVBString)
then I can loop through these possible duplicates and compare the full image.
Without this I would have to loop through the entire table searching for duplicates which is gonna be heavy on memory and cpu.
Any other ideas or standard practice I have missed ?