復制代碼 代碼如下:
insert into dbo.SNS_BlogData(userName) values('jiangyun') ;
SELECT SCOPE_IDENTITY()
復制代碼 代碼如下:
public int sqlexecutereader(string sql)
{
DBopen();
SqlCommand myComm = new SqlCommand(sql, Connection);
int newID = Convert.ToInt32(myComm.ExecuteScalar());
DBclose();
return newID;
}
新聞熱點
疑難解答