Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
my code is like this

VB
try
                {
studentTableAdapter1.Update(int.Parse(txtregno.Text), txtname.Text, txtaddresse.Text, txthomephone.Text,dateTimePicker1.Value, txtemail.Text, txtfathername.Text,txtfathercellphone.Text, txtfatherofficephone.Text, txtmothername.Text,txtmothercellphone.Text, txtresdinceaddresse.Text,
 dateTimePicker2.Value, txtadmittedby.Text,  txtprevschool.Text, txtreason.Text, DateTime.Now,  int.Parse(comboBoxclass.SelectedValue.ToString()),                        openFileDialog.SafeFileName, GENDER,  int.Parse(label13.Text), int.Parse(students.Regno), students.Names, students.Addresse,                  
students.Homephone, students.Dateofbirth, students.Email,                       
 students.Fathername, students.Fathercellphone, students.Fatherofficephone, students.Mothername,students.Mothercellphone, students.Resdinceaddresse,                 
students.Admissiondate, students.Admittedby,students.Prevschool, students.Reason,                      
 students.Lastmodifieddate, students.Classvalue,students.Image, students.Gender);
 pictureBox1.Image.Save(Application.StartupPath + @"\\images" + @"\" + openFileDialog.SafeFileName);
MessageBox.Show("DATA UPDATED SUCCESSFULY", " ", MessageBoxButtons.OK, MessageBoxIcon.Information);
   }
               catch
               {
                    MessageBox.Show("error");
               }

while
VB
students.* 


is the original values and "GENDER" taken from some method
i have tried update it from another form with one called name.text like this
VB
 studentTableAdapter1.Update(int.Parse(students.Regno),name.Text,students.Addresse,students.Homephone,students.Dateofbirth,students.Email, students.Fathername,                  students.Fathercellphone,students.Fatherofficephone,students.Mothername,
students.Mothercellphone,students.Resdinceaddresse,students.Admissiondate,students.Admittedby,students.Prevschool,students.Reason,students.Lastmodifieddate,students.Classvalue,students.Image,students.Gender,students.Id,int.Parse(students.Regno), students.Names,students.Addresse,students.Homephone,students.Dateofbirth,                       
students.Email,students.Fathername,students.Fathercellphone, students.Fatherofficephone,students.Mothername, students.Mothercellphone,                    students.Resdinceaddresse,students.Admissiondate,students.Admittedby,
students.Prevschool,students.Reason,students.Lastmodifieddate,students.Classvalue,
students.Image, students.Gender);

and its updated table sucessfully i dont no what to do ? please help?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900