取存储过程output的取

简介:
sql存储过程定义字段
@RetValue int out
as 
 select @RetValue=xxxx  from .......

cs代码:
SqlCommand com = new SqlCommand("存储过程名",con对象);//建立SQL命令
com.CommandType = CommandType.StoredProcedure;//指定使用SQL存储过程
com.Parameters.Add("@RetValue", SqlDbType.Int).Direction = ParameterDirection.Output;//得到存储过程返回值

int rv = Convert.ToInt32(com.Parameters["@RetValue"].Value);//定义值接收
相关文章
|
SQL HIVE
DataGrip连接Hive执行DDL操作报错:「FAILED: ParseException line 1:5 cannot recognize input near 'show' 'indexes' 'on' in ddl statement」
DataGrip连接Hive执行DDL操作报错:「FAILED: ParseException line 1:5 cannot recognize input near 'show' 'indexes' 'on' in ddl statement」
334 0
DataGrip连接Hive执行DDL操作报错:「FAILED: ParseException line 1:5 cannot recognize input near 'show' 'indexes' 'on' in ddl statement」
|
9月前
|
存储 SQL 数据库
存储过程(Stored Procedure)
存储过程(Stored Procedure)
53 1
|
存储 SQL
SQL得到任意一个存储过程的参数列表sp_procedure_params_rowset
SQL得到任意一个存储过程的参数列表sp_procedure_params_rowsetexec sp_procedure_params_rowset 'up_rpt营业收入汇总表' PROCEDURE_CATALOG PROCEDURE_SCHEMA PROCEDURE...
1048 0
|
SQL Perl 关系型数据库
[20171211]dbms_output无serveroutput on
[20171211]如何实现dbms_output输出没有打开serveroutput on.txt orasql.org/2017/12/10/sqlplus-tips-8-dbms_output-without-serveroutput-on/ --//作者给出一个简单的方法: 1.
1168 0