Working with a Local Database File in Visual Studio

Working with a Local Database File in Visual Studio

  • Comments 10

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!

Leave a Comment
  • Please add 2 and 5 and type the answer here:
  • Post
  • 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.

  • Hi Greg,

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

    -B

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

  • 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

  • How do i publish my VB SQL project, so that it works fine on client machines without complaining that the DB is not on the machine?

  • Is there an updated Process on this I am working with VS 2010 Pro and a local database seems to be SQL compact (.sdf file) and it seem to not be storing the data. I have followed your videos several times...no luck

    Can you still choose a SQL Express database ? if so any hints

    any info or articles you could offer would be great

    Thank you

  • Beth,

    Im Working With A Local Database sql3.5, i'm trying to get the database to automatically

    times quanity * units as a sum. I just can't figure it out. Any help is appreciated.

    thanks

  • my local database of visual studio 2008 is not working so what can i do for it please tell me

  • how can i create two table and do relationship between them in local database in visual studio 2008

  • Hi, I want to use the database in such way so that where I deploy my desktop application it will take the Database which resided into Application. I dont want to set/change the connectionstring everytime whereever I will install my application. Can you help me. How will I proceed?

Page 1 of 1 (10 items)