c#.net中怎么调用oracle的fuction 直接用 包名.函数名(参数)就可以了阿比如说:inventory_part_api.get_description(CONTRACT, PART_NO) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我只知道用这个Command.Parameters手上没有C#,你看看msdn 用 select SF_GET_PICKING_NO(as_whcode Char) 不可以么?函数就是这样调用的阿 OracleCommand cmd = new OracleCommand();cmd.CommandText = 包名.函数名;cmd.CommandType = CommandType.StoredProcedure;.....OracleParameter p0=new OracleParameter();p0.Direction=ParameterDirection.InPut;p0.Value=...cmd.Parameter.Add(p0);OracleParameter p1=new OracleParameter("p_Out",...);//默认情况表示是输入参数,此时不需要下面一句:p1.Direction=ParameterDirection.Output;p.Value=....cmd.Parameters.Add(p1);....cmd.ExecuteNonQuery();OracleParameter pp=cmd.Parameters[indexnumber];pp就是返回值仅供参考,跟直接调用存储过程没什么差别 //默认情况表示是输入参数,此时不需要下面一句:这一句放错位置了,我是想说:如果是输入参数的话,默认情况是不需要p0.Direction=ParameterDirection.InPut;这一句的。 关于c#里的LinkedListNode<结构体>,怎么修改结构体里面的成员值? 数据绑定 不存在此行/列的数据 winsock接收数据问题 xml的编写请指教 紧急求助:怎样对付变化无常的客户? 请问如何查看c#控件的源程序? 谁 会把数据库中的img 取出 并显示到网页的指定位置 或者 用imgbox 显示(使用流不保存图片) 怎样解决这个数据库问题? C#中我已经获得了ie窗口的句柄,怎样引用他 请问谁有制作插件的经验? 替换XML文件的字符串的问题 在线求救代码!!!十万火急(TreeView和dataGrid控件问题),100分回报!
Command.Parameters
手上没有C#,你看看msdn
函数就是这样调用的阿
cmd.CommandText = 包名.函数名;
cmd.CommandType = CommandType.StoredProcedure;
.....
OracleParameter p0=new OracleParameter();
p0.Direction=ParameterDirection.InPut;
p0.Value=...
cmd.Parameter.Add(p0);
OracleParameter p1=new OracleParameter("p_Out",...);
//默认情况表示是输入参数,此时不需要下面一句:
p1.Direction=ParameterDirection.Output;
p.Value=....
cmd.Parameters.Add(p1);....
cmd.ExecuteNonQuery();OracleParameter pp=cmd.Parameters[indexnumber];
pp就是返回值
仅供参考,跟直接调用存储过程没什么差别
这一句放错位置了,我是想说:如果是输入参数的话,默认情况是不需要
p0.Direction=ParameterDirection.InPut;这一句的。