public SqlCommand CreateCommand(string CommandText)
{
open();
SqlCommand cmd=new SqlCommand();
cmd.CommandText=CommandText;
cmd.Connection=conn;
return cmd;
}dr=cmd.ExecuteReader(CommandBehavior.CloseConnection);
老说cmd没有定义,不知道什么原因