Unanswered: Inserting Fingerprint templates as varchar not as bytea type in PostgreSQL
I am not able to insert fingerprint templates in db. I am using the datatype as varchar(4000).
But when i tried with bytea type itk ok.
Isn't possible to insert these templates as varchar?
I have tried with varchar but its showing the illegal argument exception "\0 not allowed".
It sounds as if your fingerprint templates are binary data. (the bytes in the data can be of any value from 00 through FF)
While you could store the binary data as varchar, it would be very inefficient.
You would have to convert each byte of data to 2 characters - the text representation of the hexadecimal data. If you are using ascii text, this means that the size of the stored text would be double the size of the original data. And, if you are using unicode, or any other 2 byte text mode, you will need 4 bytes of database storage to hold 1 byte of binary data. Plus, there is the custom encoding and decoding...
Last edited by loquin; 11-15-10 at 13:13.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert