Why is my table not being created?
I've got this code in my Winforms app to create a table in an existing database, (which I created by following what is written here ): private void CreateTables() { string connStr = @"Data Source= (LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory| \AYttFM.mdf;Integrated Security=True"; using (var connection = new System.Data.SqlClient.SqlConnection(connStr)) { try { connection.Open(); using (var command = connection.CreateCommand()) { StringBuilder sb = new StringBuilder(); sb.Append("CREATE TABLE [dbo].[AssignmentHistory] "); sb.Append("("); sb.Append("[Id] INT NOT NULL PRIMARY KEY, ");