cmd.CommandText = sel; cmd.CommandType = CommandType.Text;

img


设计登陆界面时登陆就报错
IndexOutOfRangeException: 索引超出了数组界限。
SqlConnection conn = new SqlConnection(Formlist.connection_str);这一句

connection_str的值是多少,调试看看。
Formlist没有那么多条数据,导致索引越界