Kevin

天高任鸟飞,海阔凭鱼跃

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
StrSql = "Insert into AAA(Name) Values('hello');Select @ID=@@IDENTITY"
m_Command = new SqlCommand( StrSql, m_Connection );
int newid = Convert.ToInt32( m_Command.ExecuteScalar() );

in storeprecedure:
Insert into AAA(Name) Values('hello')
Select @ID=@@IDENTITY
posted on 2006-01-24 14:32  Kevin  阅读(204)  评论(0编辑  收藏  举报