The Artima Developer Community
Sponsored Link

.NET Buzz Forum
X-Copy MindShift

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Watermasysk

Posts: 661
Nickname: scottwater
Registered: Aug, 2003

Scott Watermasysk is an ASP.NET developers. He wrote the .Text blog engine.
X-Copy MindShift Posted: Jun 29, 2004 9:00 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Scott Watermasysk.
Original Post: X-Copy MindShift
Feed Title: ScottW's ASP.NET WebLog
Feed URL: /error.aspx?aspxerrorpath=/blog/rss.aspx
Feed Description: ASP.NET and Blogging
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Scott Watermasysk
Latest Posts From ScottW's ASP.NET WebLog

Advertisement

Very nice post explaining the x-copy options in SQL Server Express by one of the folks behind the VSData blog:

"The preferred way is to simply copy the database into your project.  So, from the project menu, right click and choose “Add new item“ or “Add existing item“.  In either case the MDF (and LDF if present) is copied into your project.  Then a connection is automatically opened for you in Server Explorer.  So, you can directly party on the database structure.

SSE supports a connection style where you do not specify the logical database name.  You simply leave it blank in the connection string and one is generated for you automatically on the fly (based on the unique path of the MDF in the directory structure).  When your app closes down (app domain), the MDF is auto-closed which leaves the MDF in a copyable state. 

So, you can build your app and directly reference the MDF that will be in the same directory as your .exe.  When you hit F5, the project system builds your .exe/dlls and copies the MDF to the output directory.  When your app runs, it directly references the MDF that is in same directory as your exe (or relative to it).  When your app spins down and the app domain closes, both your executables and your database are Xcopyable (mailable, zippable, whatever ...) to the destination of your choice."

I definitely recommend you check out the rest of the post. It has a lot of great information.

Read: X-Copy MindShift

Topic: The New Visual Studio 2005 Express Beta Products and MSDN Product Feedback Center Previous Topic   Next Topic Topic: Whidbey Beta 1 Ships!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use