22.2. Use the SQL Publishing Wizard

Visual Web Developer (VWD) includes a SQL Publishing Wizard that helps you deploy development database content to the remote SQL Server. Hosting companies use different schemes for managing these databases, so it's impossible to give exact instructions for the host. For example, you may need to create the database manually in a graphical tool before proceeding with the script to generate and populate the tables.

22.2.1. Creating a database script

A SQL script that creates the database tables and inserts the data is commonly required. The SQL Publishing Wizard generates the .sql script based on your local database. Follow these steps to create the SQL script for an existing database:

  1. Open a project that uses a SQL Server (including Express) database.

  2. Open Database Explorer (Server Explorer in non-Express versions).

  3. After ensuring that the connection is open, right-click the data connection and choose Publish to Provider from the context menu that appears.

    The Database Publishing Wizard opens.

    If the wizard fails, return to Database/Server Explorer and expand the data connection node to force the connection state to Open and try again.

  4. Click Next.

  5. In the Select Database window, select the database that you want to publish and then click Next.

  6. In the Select an Output Location window, select the Script to File option, enter the location and name of the ...

Get ASP.NET 3.5 For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.