Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie ? on creating Dataset in VS 2005
Message
 
 
À
26/07/2006 16:17:15
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01139720
Message ID:
01140467
Vues:
13
>hahaha ... you don't need to understand it all ... but that's your Typed DataSet.
>
>Now, whenever you use that DataSet you should get Intellisense for your all your DataTables, your Typed DataColumns and methods. That's really all there is to it.
>
>Now, instead of accessing data like you had to with regular DataSets:
>
>MyDataSet.Tables["MyTable"].Rows[0]["MyStringColumn"] = "abc";
>
>
>you can use this much easier syntax:
>
>MyDataSet.MyTable[0].MyStringColumn = "abc";
>
>

Thank you for the explanation, Bonnie. But the most helpful was your pointing to me that I have to see code in the .Designer.cs file. Now I can follow what VS 2005 does when I add a table or a column, etc. Before I was completely in the dark. Now I am beginning to see the light. As they say, could be a train at the end of the tunnel <g>.

If I could ask you another question, please.

Say I have a form class in my project where in the Submit method of this class I want to "manipulate" my dataset and my datatables of the dataset. Do I need to define the dataset in the code as following?
Dataset1 Mydataset = new Dataset1();
And then to define the table as
Datatable1 MyTable = new Datatable1();
If the above make sense and the table MyTable1 has a column MyColumn1, how would I write a code to add a row to the table and set value of the column MyColumn1 to "Thank you Bonnie and Kevin for your help"? <g>

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform