Page 1 of 1

problem with uploading a file to oracle.

Posted: Tue Mar 30, 2004 2:59 pm
by mahmood
I am trying to upload a file to a BLOB field in oracle. I expected a simple INSERT would do the job. this is my form page (simple version):

<form enctype="multipart/form-data" action="upload.php" method="post">
<input name="userfile" type="file">
<input type="submit" value="Send File">
</form>

in my upload.php page I have:
...
$sql="INSERT INTO uploaded_files ....
...

So why do I get this error:
"Warning: OCIStmtExecute: ORA-01465: invalid hex number "

It seems that uploading a file is not like inserting some text into a field. Could somebody give a simple code needed for my upload.php page.

Posted: Tue Mar 30, 2004 5:01 pm
by mahmood
well ...
I changed the field to CLOB (instead of BLOB) and i don't get the error message, now i need to know what script downs them.