Prev: Delete control?
Next: WCF Exception: Type 'MyType' with Data Contract Name 'Some Name'is not Expected
From: John on 25 Feb 2010 19:13 Hi I have a winform with form controls bound to a binding source. How can I; 1. Use a dynamically created sql to retrieve data from the backend table and use it as data source for binding source? 2. Save the data back to the backend table when data is changed in the form controls and user presses Save on binding navigator? Many Thanks Regards
From: Cor Ligthert[MVP] on 26 Feb 2010 04:11
John, The bindingsource is working dynamically. The mistake most often is made, when there are questions like yours, is that persons set a New object to the source of the bindingsource, the source of the bindingsource stays then the same. If you fill the object of the bindingssource (a list, a dataview, a datatable or whatever), then the data in that will be used. How to do the retrieval and updating of your database data is 100% depending from the Database methods you are using and the kind of database, that is not more one method like in the days of VB6, but impossible to tell, because those can be used mixed as well. Success Cor "John" <info(a)nospam.infovis.co.uk> wrote in message news:#TXa8hntKHA.5940(a)TK2MSFTNGP02.phx.gbl... > Hi > > I have a winform with form controls bound to a binding source. How can I; > > 1. Use a dynamically created sql to retrieve data from the backend table > and use it as data source for binding source? > > 2. Save the data back to the backend table when data is changed in the > form controls and user presses Save on binding navigator? > > Many Thanks > > Regards > |