attachment in database

  • Thread starter Thread starter Guy Cohen
  • Start date Start date
G

Guy Cohen

Hi all
What is the correct field type in sql server 2005 for attachments?
I used TEXT and tried to store a small jpg file (30KB).
I got a run time error
"Attempted to read or write protected memory"
I tried to play with inserted value, when I insert there:
""
or
chr(1)
or
chr(1) & chr(0) & chr(1)
There is no problem....

Please advise -

TIA
Guy Cohen
 
Hi all
What is the correct field type in sql server 2005 for attachments?
I used TEXT and tried to store a small jpg file (30KB).

You can use the IMAGE data type (really a blob) or the new varbinary(max)
in SQL Server 2005.
 
Back
Top