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

Summary

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.

Exercise

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.

Summary

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-2024 ASPAlliance.com  |  Page Processed at 2024-05-18 9:58:11 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search