摘要:
1.OUPUT参数返回值例: 向Order表插入一条记录,返回其标识CREATEPROCEDURE[dbo].[nb_order_insert](@o_buyeridint,@o_idbigintOUTPUT)ASBEGINSETNOCOUNTON;BEGININSERTINTO[Order](o_buyerid)VALUES(@o_buyerid)SET@o_id=@@IDENTITYENDEND存储过程中获得方法:DECLARE@o_buyeridintDECLARE@o_idbigintEXEC[nb_order_insert]@o_buyerid,o_idbigint2.RETURN过
阅读全文
posted @ 2011-04-09 12:18
上校
阅读(216)
推荐(0)
编辑
摘要:
1.获取Return返回值程序代码//存储过程//Create PROCEDURE MYSQL// @a int,// @b int//AS// return @a + @b//GOSqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["LocalSqlServer"].ToString());conn.Open();SqlCommand MyCommand = new SqlCommand("MYSQL", conn);MyCommand.Comman
阅读全文
posted @ 2011-04-09 12:15
上校
阅读(538)
推荐(0)
编辑