If you are coming from pre .net programming or another language
altogether, the most basic thing to understand is that a dataset is not
a connected set of records, it's an in-memory set of tables. The tables
are also in-memory. So all changes you make must be saved back to the
server with update/insert/delete statements.
The basic working mode is:
You need a connection object. (Oledbconnection)
You need an adaptor object (Oledbadaptor).
Your adaptor needs Select/Insert/Update/Delete statements. (Just the
ones you need, all are not necessary.) These can be in the adaptor
properties or seperate items.
You then use a "Fill" command on the adaptor to fill one or more tables
in the dataset.
A good book is a must to learn this. I like Francisco Balena's books,
but they're mostly VB.net.
I guess it's too ambitious to answer this question briefly, hope it
helped a little.
Bob Graham
BlackHat wrote:
I am currently working on a program that will connect to a MySQL server, and
manipulate data in a datagrid. However, I'm having trouble understanding a
lot of the process. I need help understanding DataSets in a context I can
follow. I have tried to piece together how they work by going over MSDN
definitions/examples and by looking it up in my Visual C# .NET Step by Step
book... neither is clicking with me.
I need a broad paint stroke on how DataSets, DataTables, DataViews all fit
together. Any information would be appreciated.
Have I missed a section that was vital to understanding DataSets?
Thank you for your time.