views:

122

answers:

1

I have tables in a local database I've built in Visual Studio 2008 that I want to publish to an existing database on the server that I will be deploying my Asp.NET app. Unfortunately the only two options I have for deploying this database when I select "publish" is -script to file- and -publish to shared hosting provider-. My dedicated DB server is neither.

Can someone help point me in the right direction?

+1  A: 

Put your database in the App_Data folder (this is a common approach with SQL Express) and then when you publish there should be an option for including files in the App_Data folder. Once your site goes live, you would definitely NOT want to select this option :)

Also, here is a Microsoft article about using SQL Express with ASP.NET: http://msdn.microsoft.com/en-us/library/ms247257.aspx

John JJ Curtis
I'm trying to transfer a single (or multiple) table from my local SQLExpress to a preexisting MSSQL DB that resides on a dedicated server. I'm not sure how this applies. Maybe I'm missing something?
Matt Dunnam
Gotcha. Do you want to publish your tables as new tables on your database server? Do you want to replace existing tables? Do you want to merge the tables into existing tables?
John JJ Curtis
Well right now I want to publish them as new tables. I may want to update them with data from development in the future so I'd like to know how to do both.
Matt Dunnam
My guess is that you may want to use a program to do this that could be run separately from the publish command in Visual Studio. Are you completely set on having the table command run right when you run the publish command?
John JJ Curtis