hye..
I have a database call student which consists of all students information and also student id..
i have created a form that admin have to insert all the data about student..
then after admin click a save button,
i want to display all the information also with the student id(autonumber)..
i have try,but got an error..:(
this is my coding..
can anyone guide me..
OleDbConnection conn = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=dbStd.mdb;");
OleDbCommand cmd = new OleDbCommand("SELECT StdId FROM Student WHERE StdId ='{0}'");
conn.Open();
OleDbDataReader dr = null;
dr = cmd.ExecuteReader();
while(dr.Read())
{
textBox1.Text = dr.GetString(0);
}
dr.Close();
conn.Close();