[求助] 怎么得到DataReader返回的值??
1 SqlConnection sconn = new SqlConnection();
2 sconn.ConnectionString = ........
3 sconn.Open();
4 SqlCommand incmd = sconn.CreateCommand();
5 incmd.CommandText = "select max(userid) from users";
6 SqlDataReader myread = incmd.ExecuteReader();
7 myread.Read();
8 myread.GetSqlInt32(0);
9 myread.Close();
10 sconn.Close();
在第8行中,用个整形变量id怎样得到max(userid)的值呢?