-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: DesignedforDOTNet
Message 2 in Discussion

hi... here is the code that creates a dataset and a datatable and adds the values in 
an array list to the datatable. you can modify it to your needs.   <Code>   DataSet 
dummyDataSet=new DataSet("dummyDataSet"); 
DataTable dummyTable=new DataTable("dummyTable");  ArrayList dmcol=new ArrayList();
dmcol.Add("");
      
    int i;
      
    dummyDataSet.Namespace= "Your NameSpace";
    DataColumn c2 = new DataColumn("User");
    DataColumn c1 = new DataColumn("Action");
    DataColumn c3 = new DataColumn("Time");
    dummyTable.Columns.Add(c1);
    dummyTable.Columns.Add(c2);
    dummyTable.Columns.Add(c3);
    dummyDataSet.Tables.Add(dummyTable);
    // Add  rows.
    DataRow newRow;
    for(i=0;i<dmcol.Count;i++)
    {
         newRow = dummyTable.NewRow();
         newRow["User"]= dmcol[i].ToString();
         newRow["Time"]= dmcol[i].ToString();
         newRow["Action"]= dmcol[i].ToString();
         dummyTable.Rows.Add(newRow);
    }//ends for loop
    dummyDataSet.AcceptChanges();    </Code> Regds Kannan.V

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to