HOW TO: Create a SQL Server Database Programmatically by Using ADO.NET and Visual C# .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q307283then connect to the database, use syntax like the following to create a table:using System.Data.SqlClient;SqlConnection myConn = new SqlConnection ("Server=localhost;Integrated security=SSPI;database=YourDBName");String sQL = "CREATE TABLE YourTableName ...";SqlCommand myCommand = new SqlCommand(sSQL, myConn);myConn.Open();
myCommand.ExecuteNonQuery();