.NET调用ORACLE存储过程报错,参数“prm_errormsg”: 没有为可变长度的数据类型 String 设置大小。

lizhaoc 2009-01-15 11:56:34
.NET调用ORACLE存储过程报错,

output::参数“prm_errormsg”: 没有为可变长度的数据类型 String 设置大小。

请问各位大侠有遇到这方面的问题吗?

存储过程中,prm_errormsg的类型是varchar2
when others then
prm_appcode := -1;
prm_errormsg := '维护个人基本信息错误,错误信息:'||sqlerrm;
return;

.net中,我调用语句是:

cmd.Parameters.Add("prm_errormsg", OracleType.VarChar);
cmd.Parameters["prm_errormsg"].Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
...全文
593 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuyq11 2010-07-26
  • 打赏
  • 举报
回复
SQL语句中参数定义不对Oracle中用“:”

where = " and title like '%'+:s+'%'";
OracleParameter parm = new OracleParameter("s", OracleType.NVarChar, 90);
xinlei100 2010-07-26
  • 打赏
  • 举报
回复
我遇到同样的问题,用二楼的做法,已经成功。谢谢
qianjindandan 2009-02-24
  • 打赏
  • 举报
回复
我昨天试出来了,把变量名字符改少点,太长了,.net调oracle就有问题,把prm_errormsg改简洁点就通过了,具体控制在多少字符我也不太清楚,正在查
qianjindandan 2009-02-23
  • 打赏
  • 举报
回复
我设置了cmd.Parameters.Add("prm_errormsg", OracleType.VarChar,100);
cmd.Parameters["prm_errormsg"].Direction = ParameterDirection.Output;
他又报一个错ORA-01036: 非法的变量名/编号,
一天了 ,急啊!!
Adechen 2009-01-15
  • 打赏
  • 举报
回复
同楼上的看法一样
jiaowei051 2009-01-15
  • 打赏
  • 举报
回复
cmd.Parameters.Add("prm_errormsg", OracleType.VarChar,100);
cmd.Parameters["prm_errormsg"].Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
java反编译工具jad 1.5.8g支持 jdk1.5,jdk1.6。说明很多记住一个万能的命令基本就够用了。jad -sjava -r -8 -o **\*.class ---------------This is README file for Jad - the fast Java Decompiler.Jad home page: http://www.kpdus.com/jad.htmlCopyright 2001 Pavel Kouznetsov (jad@kpdus.com).0. Please read the disclaimer on the Jad home page.1. Installation.Unzip jad.zip file into any appropriate directory on your hard drive.This will create two files: - an executable file named 'jad.exe' (Windows *) or 'jad' (*n*x) - this README fileNo other setup is required.2. How to use JadTo decompile a single JAVA class file 'example1.class' type the following: jad example1.classThis command creates file 'example1.jad' in the current directory.If such file already exists Jad asks whether you want to overwrite it or not.Option -o permits overwriting without a confirmation.You can omit .class extension and/or use wildcards in the names ofinput files.Option -s allows to change output file extension: jad -sjava example1.classThis command creates file 'example1.java'. Be careful when usingoptions -o and -sjava together, because Jad can accidentally overwriteyour own source files.Jad uses JAVA class name as an output file name. For example, if classfile 'example1.class' contains JAVA class 'test1' then Jad will createfile 'test1.jad' rather than 'example1.jad'. If you want to specifyyour own output file name use the output redirection: jad -p example1.class > myexm1.javaOption -d allows you to specify another directory for output files,which are created, by default, in the current directory. For example: jad -o -dtest -sjava *.class (or jad -o -d test -s java *.class, which has the same effect)This command decompiles all .class files in the current directory <

62,269

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧