N
NITIN MUNJAL
hello, i am facing a problem in the runtime. this code is throwing
exception details of which are writtten below that
CODE
string strConn=@"Provider=Microsoft.Jet.OLEDB.4.0 ;Data Source=" +
Server.MapPath("/db.mdb");
OleDbConnection myConn = new OleDbConnection(strConn) ;
string strCon ="SELECT email FROM authenticate WHERE uname="+uname ;
OleDbCommand vicomm = new OleDbCommand(strCon, myConn) ;
myConn.Open();
OleDbDataReader reader ;
reader = vicomm.ExecuteReader() ;
reader.Read() ;
string email = reader.GetString(0) ;
reader.Close();
myConn.Close();
EXCEPTION DETAILS
Exception Details: System.Data.OleDb.OleDbException: No value given
for one or more required parameters.
Line 25: reader = vicomm.ExecuteReader() ;
WHAT I AM TRYING TO DO IS TO RETRIEVE THE EMAIL ADDRESS OF THE PERSON
GIVEN HIS USERNAME
TIA
NITIN
exception details of which are writtten below that
CODE
string strConn=@"Provider=Microsoft.Jet.OLEDB.4.0 ;Data Source=" +
Server.MapPath("/db.mdb");
OleDbConnection myConn = new OleDbConnection(strConn) ;
string strCon ="SELECT email FROM authenticate WHERE uname="+uname ;
OleDbCommand vicomm = new OleDbCommand(strCon, myConn) ;
myConn.Open();
OleDbDataReader reader ;
reader = vicomm.ExecuteReader() ;
reader.Read() ;
string email = reader.GetString(0) ;
reader.Close();
myConn.Close();
EXCEPTION DETAILS
Exception Details: System.Data.OleDb.OleDbException: No value given
for one or more required parameters.
Line 25: reader = vicomm.ExecuteReader() ;
WHAT I AM TRYING TO DO IS TO RETRIEVE THE EMAIL ADDRESS OF THE PERSON
GIVEN HIS USERNAME
TIA
NITIN