June 2002
Intermediate to advanced
864 pages
18h 35m
English
An XML schema can be used to generate a dataset that is “typed.” Instead of using the index property of a collection to access an element of the dataset, you can use the name of a column. Here is a fragment from the TypedDataSet example:
Dim UAL As AirlineBroker.AirlinesRow = _
a.FindByName("United")
Console.WriteLine("{0}({1}) ReservationNumber:{2} " & _
"WebSite:{3}", UAL.Name.Trim(), _
UAL.Abbreviation.Trim(), _
UAL.ReservationNumber.Trim(), UAL.WebSite.Trim())
You can assign a meaningful name to rows as well as use strong typing to make sure you are working with the data element you want. If you try to set the field UAL.ReservationNumber to an integer, the compiler will detect the mistake.
A typed DataSet inherits from the ...
Read now
Unlock full access