["Anderson Sone" <[EMAIL PROTECTED]>]
> How can i insert a file in a Database?
> I´m using PHP + MSSQL 2k
> 
> I´m trying to insert a .doc file in a db. I read the file and put it in a
> db.
> I´m 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
> _____________

If you are using PHP's ODBC functions, all you need to do is:

$stmt = odbc_prepare("INSERT INTO table VALUES(?)");
$res = odbc_execute($stmt, array("'/path/to/file'"));

Notice the single quotes around the file name.

If you're using the mssql functions, I don't know.

 - Stig

-- 
  Stig Sæther Bakken <[EMAIL PROTECTED]>
  Fast Search & Transfer ASA, Trondheim, Norway

-- 
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