08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 4 ■ DATA BINDING WITH <strong>ASP</strong>.<strong>NET</strong> 81<br />

Figure 4-12. Finding a database to attach<br />

Once you’ve done this, the database <strong>and</strong> its log file will be attached to your SQL<br />

Server instance, <strong>and</strong> you will be able to write applications that access it from within<br />

Visual Studio.<br />

Note that if you are using Windows Vista, the operating system will prevent you from<br />

writing to the Data directory for security reasons, <strong>and</strong> this operation will fail. You will need<br />

to navigate to the MDF <strong>and</strong> LDF files for AdventureWorks from within Windows Explorer<br />

<strong>and</strong> use the security settings in the Properties dialog box. Add permissions for the SQL<br />

Server processes to have full control over these files.<br />

Once you’ve connected the database, you can view its contents within Management<br />

Studio. See Figure 4-13 for an example of the data that this table contains, namely the<br />

addresses of the (fictional) people who are part of the AdventureWorks customer database.

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

Saved successfully!

Ooh no, something went wrong!