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

New Message on BDOTNET

-----------------------------------------------------------
From: Neeraj_Bangalore
Message 3 in Discussion

 Hi,    To create a dataset, try something on these lines :    Firstly create a new 
table and a new dataset at runtime : Dim ds as new Dataset Dim dt as new table.    
Then Add columns to it.  dt.Columns.Add ( ------- )  dt.Columns.Add ( ------- )  
dt.Columns.Add ( ------- )   If you want to add new rows ( with values ) to it then 
use this also :    To create a new row :  dim dr as datarow dr = dt.NewRow   To fill a 
newly craeted row :  dr("ColumnName1") = "Value1" dr("ColumnName2") = "Value2"   Then 
to add the row to our table. dt.Rows.Add(dr)     Then Add this table to the dataset: 
ds.Tables.Add (dt)    
Example :  
This will create a new data table with balnk rows.  
Dim dt As New DataTable 
dt.Columns.Add("txt1", Type.GetType("System.String")) 
dt.Columns.Add("txt2", Type.GetType("System.String")) 
Dim dr As DataRow 
Dim i As Int16 
For i = 0 To 5 
dr = dt.NewRow 
dt.Rows.Add(dr) 
Next This is all for creating the dataset/datatable at runtime. Now see how can you 
use it. In case of issues, please revert back. 
Regards,
Neeraj Saluja
 
 

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

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