zoukankan
html css js c++ java
在.net中接收存储过程返回的值
getCon();
//
连接数据库的方法
int
id
=
35
;
SqlParameter[] par
=
new
SqlParameter[
2
];
par[
0
]
=
new
SqlParameter(
"
@id
"
, SqlDbType.Int);
par[
0
].Value
=
id;
par[
1
]
=
new
SqlParameter(
"
@count
"
, SqlDbType.Int);
par[
1
].Direction
=
ParameterDirection.Output;
//
设置为输出参数
SqlHelper.ExecuteNonQuery(con, CommandType.StoredProcedure,
"
getChildCount
"
, par);
this
.Label1.Text
=
par[
1
].Value.ToString();
//
接收输出的参数
存储过程代码如下:
create
proc
getChildCount
@id
int
,
@count
int
output
as
select
@count
=
babycount
from
yangsCMS_Article_Class
where
id
=
@id
order
by
treekey
查看全文
相关阅读:
LeetCode:Remove Nth Node From End of List
链表排序(冒泡、选择、插入、快排、归并、希尔、堆排序)
快速排序partition过程常见的两种写法+快速排序非递归实现
LeetCode:Permutations, Permutations II(求全排列)
LeetCode:3Sum, 3Sum Closest, 4Sum
LeetCode:Two Sum
判断一个图是否有环
c++设计一个无法被继承的类
设计模式--单例模式
windows多线程同步互斥--总结
原文地址:https://www.cnblogs.com/yangbin1005/p/989865.html
最新文章
LeetCode:Insert Interval
LeetCode:Merge Intervals
LeetCode:Maximum Subarray
机器学习算法中的偏差-方差权衡(Bias-Variance Tradeoff)
如何选择机器学习算法
机器学习中的规则化范数(L0, L1, L2, 核范数)
LeetCode:Unique Paths I II
LeetCode:Rotate List
最大子数组和(最大子段和)
数组排列组合算法汇总
热门文章
从n个元素中选择k个的所有组合(包含重复元素)
C++ 中的位操作
LeetCode:String to Integer (atoi)
LeetCode:Search Insert Position,Search for a Range (二分查找,lower_bound,upper_bound)
LeetCode:Anagrams
Leetcode:Palindrome Number
LeetCode:Longest Palindromic Substring 最长回文子串
LeetCode:Median of Two Sorted Arrays
LeetCode:Merge k Sorted Lists
Leetcode:Merge Two Sorted Lists
Copyright © 2011-2022 走看看