narasiman rao

narasiman rao

  • NA
  • 519
  • 771.9k

update the combo box record into database using csharp.

Feb 19 2013 3:19 AM


Note it is windows application

  Data base Structure as follows in Ms Access;
  Name    Text
  Day       Text
 

Design as follows;
Name Combo box
Day Combo box
 
In the name column,all names retrieved from the database and display into the Combo box.
In the day column day from sunday to saturday is maually by coding.
 

in the run mode. when i select the Name and Day and click the save button. the records are saved in the database.
 

in the database records as follows
 
Suresh Sunday
Suresh Monday
 

i have one search button,
when i click the search button,
the above two records are displayed in the datagridview.

 
In the datagridview records as follows;
 
Name     Day
Suresh    Sunday
Suresh   Monday
 
when i click the first record suresh in datagridview the particular record is display in to the combobox.
 
in that suppose i want to update the first record (suresh) sunday changed in to fridayand click the update button.

in the database for suresh all entries day is updated into friday.

but i want to update the friday for the first record only.

 
output as follows;
 
Suresh  Friday
Suresh  Friday
 
But i want the ouput as follows after click the update butotn(the below one is corret ouptut)


Suresh Friday
Suresh Monday
 

how to update.for that how can i do using csharp.
 
please help me.
 

Answers (1)