50,236 Members
2 added today
248,628 Resources
73 added today

All Devdex   All Gurus  

Populate a dataset from datatable or collection or string values
Author: Himanshu Dhami
Rating: Rate this Resource
Visits: 13698

Discuss in Newsgroups

Page:

 


This article shows how you can create a dataset from a collection or pure string values:

Dim custDS As DataSet = New DataSet

Dim ordersTable As DataTable = custDS.Tables.Add("Orders")

Dim orow As DataRow

'set up columns in the results table

ordersTable.Columns.Add("col1", GetType(System.String))

ordersTable.Columns.Add("col2", GetType(System.String))

ordersTable.Columns.Add("col2", GetType(System.String))

For Each object In collection

orow = ordersTable.NewRow()

orow("title") = object .Title

//or orow("title")="Test Title"


Next Page >>

Visitor Comments

Be the first to rate this article!

 

Rate this Article







	
	
	



ASP.NET Web Hosting
- FREE Setup & Domain
- First month FREE
100% IIS6 / Server 2003

ASP ArticlesThis category has been added to your weekly newsletter
ASP Web Sites
ADSI & WSH BooksThis category has been added to your weekly newsletter
FREE ComponentsThis category has been added to your weekly newsletter
ASP EventsThis category has been added to your weekly newsletter
ASP HeadlinesThis category has been added to your weekly newsletter

CSharp ArticlesThis category has been added to your weekly newsletter
C# Web SitesThis category has been added to your weekly newsletter

SQL ArticlesThis category has been added to your weekly newsletter
SQL Events
SQL HeadlinesThis category has been added to your weekly newsletter
SQL Jobs

Jobs in CaliforniaThis category has been added to your weekly newsletter

XML ArticlesThis category has been added to your weekly newsletter
XML BooksThis category has been added to your weekly newsletter
XML Web Sites
XML Tutorials

free asp host

"Alex Homer"This search has been added to your weekly newsletter

Edit My Favorites Edit Profile & Favorites

 




Developersdex Home | ASP | C# | SQL | VB | XML | Gurus
Add Your Link | Add Your Code | FAQ | Advertise | Link To Us | Contact Us |
Copyright © 2010 Developersdex™. All rights reserved.