I think you need write a line with a code like this one. Because your data
contais quotes.

$data = addslashes(fread(fopen($binFile, "r"), filesize($binFile)));

- where $binFile is the name of your variable FILE (wich you want to insert at
your DB ).

If you are confused see the addslashes  in php doc.

Mario H.C.T.
Mais um brasileiro aqui !. :)


Anderson Sone wrote:

> How can i insert a file in a Database?
> Im using PHP + MSSQL 2k
>
> Im trying to insert a .doc file in a db. I read the file and put it in a
> db.
> Im having a lot of problem... like:
> _____________
> Warning: MS SQL message: Unclosed quotation mark before the character string
> ''. (severity 15) in C:\PHP/upload/upload4.php3 on line 28
> _____________
>
> Tks.
> Anderson Sone
> Brazil-Curitiba
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to