插入Oracle大文本的问题!!!
我现在需要将超过500000字节的大文本信息更新到Oracle数据库中,我选择的字段类型是Long,存储过程如下:
procedure ResthomeDescriptionUpdate
(
ResthomeIntroduceIDnumber,
IntroduceType Varchar2,
Descriptionlong, // 大文本
)
as
begin
update
"ResthomeIntroduce "
set
"Description "=Description,
"Type "=IntroduceType,
"Updatetime "=sysdate
where
"ResthomeIntroduceID "=ResthomeIntroduceID;
commit;
exception when others then
rollback;
end ResthomeDescriptionUpdate;
程序如下:
public int ChangeTheDataForResthomeIntroduce(int pResthomeIntroduceID,string type, string pDescription)
{
string stroePro = "common_packagebody.ResthomeDescriptionUpdate ";
OracleParameter[] param =
{
new OracleParameter( "ResthomeIntroduceID ", OracleType.Number),
new OracleParameter( "IntroduceType ", OracleType.VarChar),
new OracleParameter( "Description ", OracleType.LongVarChar),
};
param[0].Value = pResthomeIntroduceID;
param[1].Value = type;
param[2].Value = pDescription;
try
{
return OracleHelper.ExecuteNonQuery(OracleHelper.connectionStr, CommandType.StoredProcedure, stroePro, param);
}
catch (Exception ex)
{
throw new ApplicationException(ex.Message);
}
}
现在程序出现错误:
"unimplemented or unreasonable conversion requested "
我在PL/SQL中测试这个存储过程也出现这个问题,请问大家这是怎么回事???
谢谢!!!
[解决办法]
long不是推荐的长文本类型
8i以上可以使用clob
[解决办法]
LS正解,我用过,的确是CLUB类型好使~~~~~~~~~
[解决办法]
up