15.02.2015 Views

C# 4 and .NET 4

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Working with aDo.neT ❘ 855<br />

The closing tag on RegionDescription is over to the right of the page because the database column is<br />

defined as NCHAR(50), which is a 50-character string padded with spaces.<br />

The output produced in the WithSchema.xml file includes the XML schema for the DataSet as well as the<br />

data itself:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

1<br />

Eastern<br />

<br />

<br />

<br />

2<br />

Western<br />

<br />

<br />

<br />

3<br />

Northern<br />

<br />

<br />

<br />

4<br />

Southern<br />

<br />

<br />

<br />

code download WithoutSchema.xml<br />

Note the use in this file of the msdata schema, which defines extra attributes for columns within a DataSet,<br />

such as AutoIncrement <strong>and</strong> AutoIncrementSeed — these attributes correspond directly to the properties<br />

definable on a DataColumn class.<br />

WorKing WiTh ado.neT<br />

This section addresses some common scenarios when developing data access applications with ADO.<strong>NET</strong>.<br />

Tiered development<br />

Producing an application that interacts with data is often done by splitting up the application into tiers. A<br />

common model is to have an application tier (the front end), a data services tier, <strong>and</strong> the database itself.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!