I am trying to Save database information from a Combobox to a database and then retrieve the information back to the User.
I am already able to Save to the database. The step I am struggling with is to push the information from the database back to the app and to show the information from the database combobox. I have already tried using Databinding withing c sharp this does not solve the problem.
Any help will be appreciated.
Regards
Loading
Pankaj Kumar ChoudharyPosted Mar 25, 2015, 9:45 PM
there is one problem with this method is that it will not update you combobox if any type of the updation is performed in DB because this method fetched the data from DM when form is loaded.
if you want to update your combobox if any type of the updation is performed then you must be bind your combobox manually .
You can achive this by 2 method:
1. create a method which first insert the data into table and after that fetch the data from table and insert into combobox . It will perform two operation so it is little bit slow for this you can use second method.
2. Create an trigger in DB for updation which fetch the data from table when any type of the updatio is performed in tbale this method is little fast compare to first......
Pelumi EluyeraPosted Mar 26, 2015, 8:11 AM
Is this the right way to programatically bind to the database.
https://msdn.microsoft.com/en-us/library/ms742863%28v=vs.110%29.aspx
If you have any other sites in mind that would help.
Regards
Pelumi EluyeraPosted Mar 25, 2015, 6:14 PM
All I have done is use the binding source within properties window to access the Database and then use the ComboBox that way.
The information gets saved to the Database but it isnt pulled back to the application.
Any help will be appreciated.
Regards
Anurag SarkarPosted Mar 25, 2015, 3:40 PM