我正在处理一个 PL/SQL Oracle 网络应用程序, 我需要做一个处理文件上传表格的程序。 文件上传表格字段名称为 < code> new_ photo code> 。 这是我拥有的代码, 但我提交时总是有错误。 我无法在网上或在甲骨文文档中找到此任务的任何示例 。
错误 :
Error 6550 calling procedure:
ORA-06550: line 2, column 3:
PLS-00306: wrong number or types of arguments in call to INSERT_NEW_PHOTO
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
The last SQL statement executed was:
begin
insert_new_photo(:B1,:B2,:B3,:B4,:B5,:B6,:B7,:B8);
end;
代码:
CREATE OR REPLACE PROCEDURE insert_new_photo (new_photo VARCHAR2 DEFAULT NULL) IS
BEGIN
-- if the user didn t chose a file to upload
IF new_photo IS NULL OR LENGTH( new_photo ) = 0
THEN
print_page_header;
print_error( Please supply a file name. );
print_upload_form;
--print_page_trailer( TRUE );
return;
END IF;
END insert_new_photo;
/
窗体:
<form action="insert_new_photo" method="post" enctype="multipart/form-data">
<input type="text" name="new_photo"><br>
<input type="submit" value="ok">
</form>