How can i put the image file to the db ? (mssql)

From: Alper Adatoz (
Date: 11/11/03

Date: 11 Nov 2003 05:22:55 -0800


i have a little problem. i hope u guys give me a clear solution (:

db: mssql

i just want to put jpeg file to the image field at the mssql db.

and after that i want to call it back..

how can i do this ?
i tried this code ;
   $image = $_FILES['form_data']['name'];
   $image_yol = $_FILES['form_data']['tmp_name'];
   $newdata = "$image_yol";
   $data = addslashes(fread(fopen($image_yol, "r"),

to put image to the db...
but it gave me an error like
"'PHP Warning: mssql_query(): message: Line 7: Incorrect syntax near
'Japanese'. (severity 15) in d:\www\docs\php_viva\functions.php on
line 3 PHP Warning: mssql_query(): message: The identifier that starts
with 'vG!kZJ{vUtŸ\\\'_~’z‰›nŽa{W‹_‘~M\\\"[cŒ$’~j#nˆ-lr‹$s—QҾ^er}_9{UL‹'
is too long. Maximum length is 128. (severity 15) in
d:\www\docs\php_viva'is too long. Maximum length is 128"

do you have any idea?