cmd.CommandText = @"select @@identity";
int value = Int32.Parse(cmd.ExecuteScalar().ToString());
return value;

 

 posted on 2011-11-14 11:55  纳米程序员  阅读(631)  评论(0编辑  收藏  举报