Working with a Local Database File in Visual Studio

Published 31 July 09 12:58 PM

In this post and video I’ve shown folks how to work with a local database file (.mdf, .mdb, .sdf) that resides directly inside your project in order to see updates made while debugging your application. If it looks like everything saves fine while debugging, but you can’t see the updates if you look directly in the database, then there’s a simple fix. Today the VS Data Team wrote up a great blog post on this as well so check it out!

In general I prefer to develop against attached SQL Server databases because it’s easier to debug. But if you’re working with SQL Compact or Access databases you’ll need to be aware of how the database file is copied out with your application EXE and what file you are really working with.

Enjoy!

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Greg said on August 4, 2009 9:04 AM:

Can you talk about local Crystal reports and how to modify the sql query used by the report without re-designing and rewriting the report?  We ran into that problem with VS 2008.

# Beth Massi said on August 4, 2009 1:17 PM:

Hi Greg,

Sorry but I've never worked with Crystal reports, only SQL Reporting Services.

-B

# Waleed El-Badry said on August 16, 2009 7:50 AM:

Thanks Beth. I hope to see something from you concerning integrating VB with Sharepoint. Once more, you rule :-)

# Beth Massi said on August 17, 2009 12:08 PM:

Hi Waleed,

Check out this series for a simple end-to-end example of an Office business application including a SharePoint workflow here:

http://blogs.msdn.com/bethmassi/archive/2009/04/21/oba-part-5-building-the-sharepoint-2007-workflow.aspx

What exactly are you looking for?

Cheers,

-B

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

About Beth Massi

Beth is a Program Manager on the Visual Studio Community Team at Microsoft and is responsible for producing and managing content for business application developers, driving community features and team participation onto MSDN Developer Centers (http://msdn.com), and helping make Visual Studio one of the best developer tools in the world. She also produces regular content on her blog (http://blogs.msdn.com/bethmassi), Channel 9, and a variety of other developer sites and magazines. As a community champion and a long-time member of the Microsoft developer community she also helps with the San Francisco East Bay .NET user group and is a frequent speaker at various software development events. Before Microsoft, she was a Senior Architect at a health care software product company and a Microsoft Solutions Architect MVP. Over the last decade she has worked on distributed applications and frameworks, web and Windows-based applications using Microsoft development tools in a variety of businesses. She loves teaching, hiking, mountain biking, and driving really fast.

This Blog

Syndication

Page view tracker