i keep getting this error, but I don't know why, I get it here: Label1.Text = fgmail.ToString(); and here's the full code:
string st = this.pfun.Text;
string sqlstr2 = "select * from hsinfo WHERE rname='" + st + "'";
OleDbCommand cmd = new OleDbCommand(sqlstr2, DBFunction.GenerateConnection("DBS.accdb"));
OleDbDataReader reader = cmd.ExecuteReader();
string fgmail;
while (reader.Read())
{
fgmail = reader[1].ToString();
}
Label1.Text = fgmail.ToString();