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

lizhaoc 2009-01-15 12:02:00
.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();
...全文
299 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
herty 2009-01-15
  • 打赏
  • 举报
回复
不过也要看看数据库字段怎么设计的!
herty 2009-01-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 GTX280 的回复:]
cmd.Parameters.Add("prm_errormsg", OracleType.VarChar,255);//加上字符串长度
[/Quote]
正解
GTX280 2009-01-15
  • 打赏
  • 举报
回复
cmd.Parameters.Add("prm_errormsg", OracleType.VarChar,255);//加上字符串长度
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 <

111,131

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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