请教各位大侠一段VC代码,能调用具有BLOB类型和Date类型参数的ORACLE的存储过程。VC代码中需要将一张JPG图片以及序号、日期通过这个存储过程写入到某张表中,存储过程代码如下:
create or replace procedure PRO_TEST(
V_XH  in Varchar2,--序号
V_RQ  in Date,--日期
V_PHOTO1 in Blob,--图片1
V_RES  out Varchar2--返回结果,0:没有问题;其它:根据具体提示。
) is
nCount number;
begin  
  --非空检查
  if V_XH is null  or  V_PHOTO1 is null 
  then
    V_RES:='输入的信息不能为空';   
    return;
  end if;  --判断该信息是否已经存在
  begin
  select count(*) into nCount from T_MID_LOCAL where XH=V_XH;
  exception
    when NO_DATA_FOUND then
      V_RES:='没有返回查询信息'||SQLERRM;      --警告信息      
      return;     
    when OTHERS then
      V_RES:='不能查询,错误为:'||SQLERRM;      --警告信息      
      return;
  end;
  if(nCount!=0) then
    V_RES:='这条记录已经存在,不能再添加';    
    return;
  end if; 
  ------------------------其他略
  V_RES:='0';
end;