Q:

Does an ASP.NET SQL Library Exist for Managing Tables?

Does anyone know of a SQL library in ASP.NET that can be used to manage tables?
E.g.
SQLTable table = new SQLTable();
table.AddColumn(“First name”, varchar, 100);
table.AddColumn(“Last name”, varchar, 100);
if(table.ColumnExists(“Company”))
  table.RemoveColumn(“Company”);

The operations I am looking for are adding, editing and deleting tables, fields, indexes and foreign keys.
This can be done using SQL but it is messy, I am looking for a clean API that is intuitive to use.

A:

Use Microsoft.SqlServer.Management.Smo
Other option would be to install the Microsoft Sql Server Web Data Administrator
Sql Server Web Data Administrator
Some references for Smo:
Create Table in SQL Server 2005 Using C# and SMO
How to: Create, Alter, and Remove a Table in Visual Basic .NET (sorry for lang choice)

