ASP.NET & Databases Part 2
page 5 of 5
by . .
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 24749/ 65


Anything Else

I've decided not to cover the DataColumn as there isn't really anything in there, we've seen it adding columns and setting their properties, that's about it.

Dim dcol as DataColumnCollection = ds1.Tables("people").Columns
Dim dcol2 as DataColumn = dcol.Item(2)

dcol2.AutoIncrementStep = 3

The AutoIncrementStep obviously increases the step from 1 (default) to 3.

I know that this article has been a bit messy, but DataSets are a messy. Luckily, it's not too hard to see what we're doing without much of an explanation. However you should remember that Columns and Rows are made from Collections and like arrays the collection indexes start at 0. Remember that you must AcceptChanges (in most cases) to have the data sent back to the dataset.


Now using what we've learnt in this part and part 1, fill a dataset with information from a database and then make some changes to the data using the DataTable, DataRow and DataColumn objects.


You've probably seen that the DataSet is a very complex object and the DataTable, DataRow etc. are just part of that. In Part 3, we'll look at Database data in the DataSet, modifying and then sending back the data to the database.

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2021  |  Page Processed at 2021-12-01 8:33:17 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search