By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

deplying with SQLExpress database

P: 2

How do you deploy a application with a SQL express database?

My programming book offers a single paragraph that amounts to "Select publish, choose options in wizard, job done". LOL

So I gave it a try and everything seemed ok until I tried to run the program. It errored with many references to SQL... So the deployment wizard isn't smart enough to realise your application has database requirements. Strange that as all the information is sitting their in the app.config xml file. Makes you wonder why they bother exposing all this information if their own wizard can't be bothered to pick it up.

I try the wizard again and make a concerted effort to find the bit where it asks for database information. But it doesn't. I am convinced I must be missing something obvious so if anyone can point me to where or how I get the database added to the deployment I would be grateful.

Fininding the installation directory

After using the setup.exe produced by the wizard I tried to find the setup directory so I could dump a copy of the MDF and be done with it.

Does anyone know where it goes? It wasn't in Program Files, not off the root. I did a search for the exe name across the entire disk and never found it. I opened the shortcut it created but there was a long string which vaguely resembled the name of the exe repeated a few times.

Performing a manual deplyment

If however the wizard is as I suspect, a waste of time then there are a few things I need to get done manually and I wondered if anyone knew of an article that would cover the following:

1. The installation program will need to ask the location of the MDF so that it can build the connection string.

2. The connection string is going to have to be saved somewhere.

3. The program is going to have to check that some form of SQL is running and if not SQLExpress will then need to copy the contents of the MDF up to the running server (the application includes data).

Wow. VB used to be so easy, I must be getting old...

Jan 21 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 4,871
You are using SQL Server Express with Visual Web Developer to publish the site? There is a free utility that would help you create a mdf:
Cool SQL Server and SQL Express Command-Line Utility

However, this article may be more helpful in resolving your problem:
Recipe: Deploying a SQL Database to a Remote Hosting Environment (Part 1)

Hope that this helps.
Jan 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.