Dev Notes

Suspended Indefinetly...

News

<script type="text/javascript"><!-- google_ad_client = "pub-9887566656700242"; google_ad_width = 120; google_ad_height = 600; google_ad_format = "120x600_as"; google_ad_type = "text"; //2006-12-28: Savvy google_ad_channel = "6620623950"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <script type="text/javascript"><!-- google_ad_client = "pub-9887566656700242"; google_ad_width = 120; google_ad_height = 60; google_ad_format = "120x60_as_rimg"; google_cpa_choice = "CAAQxZqazgEaCMOiwb9yonQWKIHD93M"; google_ad_channel = ""; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>

Favourites

Friends

India MVP & CS

My Blog Roll

Publicity

The MSDE Deployment Toolkit (RC)

Check out this cool article on MSDE Deployment with your application installer package.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmsde/html/msdedepl.asp

Summary: Learn how to use the MSDE Deployment Toolkit (Release Candidate) to integrate MSDE deployment functionality into your application's installation package with minimal effort. Additionally, get some insight into building a reusable installer class to make this process even faster and easier. (24 printed pages)” - from msdn

Comments

LUIS FAJARDO said:

Mario Szpuszta on this article is doing a great job describing how to use the Deployment Toolkit, one of the last comments on this article, talks about the idea of attaching the database instead of using scripts for the installation of the database:

"Instead of executing DDL statements during the setup process, you can ship an existing MDF file with your setup, detached from your developer machine using sp_detach_db, and re-attach it using the system stored procedure sp_attach_single_file_db. In this case you don't need to execute any additional DDL statements for creating tables, relationships and constraints, as they should already exist in the database."

I'm trying to use this option since my database is a little bit large, so I prefer to do the attachment instead of creating a big script.

The problem that I have is that the sp_attach_single_file_db requires the PATH and name of the .mdf file to attach, how do I get the PATH where my application has being deployed? What I'm doing is including a folder under my application directoy to include the database, but I don't know where exactly the user of my application decides to deploy the application. I need to know that information at runtime, during the AfterInstall event on my InstallerClass, there is where the Database gets attached.

Thanks for your help!
luisfajardo@hotmail.com
# July 19, 2004 11:57 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)