65.9K
CodeProject is changing. Read more.
Home

SMO Tutorial 3 of n - Scripting

starIconstarIconstarIconstarIconstarIcon

5.00/5 (1 vote)

Jan 24, 2016

CPOL
viewsIcon

9611

downloadIcon

127

This is an alternative for "SMO Tutorial 3 of n - Scripting"

Changes

  • Added FormLogin allowing Windows Authentication or SQL Server Authentication
  • Added Keys, indexes and constraints
  • Added SQL Server 2008 R2 support
  • Fixed syntax coloring
  • Updated solution to VS2013

Points of Interest

When using the generated scripts on different SQL Server versions, be sure to edit the CREATE DATABASE statement. The simplest way to make sure this works is to change it to:

CREATE DATABASE [name]

(without any of the complex file name options).

Tested on Windows 7 / Windows Vista, SQL Server 2008 R2 / 2012.