Hello i want that site manager will create his own tables in the Database in 2 steps!!! the first one is to create table in the database the user can choose the name of the new table by textbox and the table get only one ID column:
SqlConnection newCon = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
String st = "CREATE TABLE DataBaseConn.dbo." + tableName.Text.Trim()
+ "(contactId INTEGER PRIMARY KEY IDENTITY)";
SqlCommand newCmd = new SqlCommand(st, newCon);
in the next step i want the user will add/insert the columns to the table (one column each time) the user will have textbox for the column name, drop down list with few kind of data type (datetime, int, varchar) and after press button the column will add to the table. ANY IDEA?????
View Complete Post