Binding source data source

J

John

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
 
C

Cor Ligthert[MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top