.net 访问 带有输出参数的存储过程,为什么无法获得输出参数值? .net 访问 带有输出参数的存储过程,为什么无法获得输出参数值? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 127.0.0.1~root@localhost~test>delimiter //127.0.0.1~root@localhost~test>create procedure sp(a int,out b int) -> begin -> select a into b; -> end; -> //Query OK, 0 rows affected (0.00 sec)127.0.0.1~root@localhost~test>call sp(100,@a); -> //Query OK, 0 rows affected (0.00 sec)127.0.0.1~root@localhost~test>select @a //+------+| @a |+------+| 100 |+------+1 row in set (0.00 sec)127.0.0.1~root@localhost~test>delimiter ;参考上面的存储过程,修改你的存储过程。 先在你的程序中 exceute ( "call proceduerName(xx,@yy"):紧跟着 execute ("select @yy") 行到返回参数的值。 Mysql中提示 Parameter '参数名' not found in the collection错误 各位大牛帮我看看这个数据库设计 数据表查询优化 关于插入数据的问题 关于绑定变量的问题 请问大家php偶尔出现链接mysql错误是怎么回事? 有没有办法从视图中创建表? mysql5.0以上版本 中可否支持表变量 sqlserver的datediff(day,startdate,enddate)+1函数如何在mysql 找到对应 MySql连接变慢【高分求助】 linux下,mysql数据导入错误! mysql怎么让varchar类型自动增长
127.0.0.1~root@localhost~test>delimiter //
127.0.0.1~root@localhost~test>create procedure sp(a int,out b int)
-> begin
-> select a into b;
-> end;
-> //
Query OK, 0 rows affected (0.00 sec)127.0.0.1~root@localhost~test>call sp(100,@a);
-> //
Query OK, 0 rows affected (0.00 sec)127.0.0.1~root@localhost~test>select @a //
+------+
| @a |
+------+
| 100 |
+------+
1 row in set (0.00 sec)127.0.0.1~root@localhost~test>delimiter ;
参考上面的存储过程,修改你的存储过程。
紧跟着 execute ("select @yy") 行到返回参数的值。