| Author |
Topic |
|
GaneshRamanan
Starting Member
40 Posts |
Posted - 2011-06-27 : 05:42:32
|
| Can u pls help me to give an Idea. How to we should store Image file in SQL SERVER and how we should compare in (WHERE CLAUSE).Thanks,Ganesh Ramanan |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-06-27 : 05:51:04
|
Image of an Employee?Store it in file system and handle (path)filename in the database. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
jfarrugia
Yak Posting Veteran
55 Posts |
|
|
GaneshRamanan
Starting Member
40 Posts |
Posted - 2011-06-27 : 06:53:57
|
| this is for using thumb impression device program, i m using varbinary(max) datatype. how i should compare? if that image exists or not? i couldnt compare on where clause?Thanks in Advance,Ganesh Ramanan |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-06-27 : 07:24:20
|
| If this is for authentication you won't get an exact match.You should get a product to do it for you as it will need some sort of confidence measure and probably match points.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
GaneshRamanan
Starting Member
40 Posts |
Posted - 2011-06-27 : 08:18:52
|
| That Device wont do any match points, its only scan the image and save it to the database, here i m using varbinary(max) datatype, can any one post an idea how to compare those values?Thanks in Advance,Ganesh Ramanan |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-06-27 : 08:33:00
|
| You could save it to a file and use windiff.I would try that first before going any further.I don't know what the resolution of the reader is but I would doubt if you would ever get an exact match if it's an image.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
jfarrugia
Yak Posting Veteran
55 Posts |
Posted - 2011-06-27 : 11:21:16
|
| just a shot in the dark...can't you hash the value before searching? something like:where fn.hash(cast(colImage as varbinary(MAX))) = fn.hash(cast(searchBindary as varbinary(MAX)))Where software development knowledge meets the reader |
 |
|
|
jfarrugia
Yak Posting Veteran
55 Posts |
Posted - 2011-06-27 : 11:22:27
|
| where fn.hash would be a hash function, you could use an md5 inbuilt hash functionHASHBYTES('MD5', 'adfadfasdfasd')Where software development knowledge meets the reader |
 |
|
|
jfarrugia
Yak Posting Veteran
55 Posts |
Posted - 2011-06-27 : 11:26:53
|
| i just tried a simple comparison between two varbinary fields.. they seem to compare ok even without applying a hash (so a hash doesnt make a difference)declare @t as varbinary(max)declare @s as varbinary(max)set @t = cast('test1' as varbinary(max))set @s = cast('test1' as varbinary(max))select @t as t, @s as sif (@t = @s)begin select 'OK'endWhere software development knowledge meets the reader |
 |
|
|
|