Saturday, August 11, 2018

Create Dynamic Table on Data Base


Create Dynamic Table on Data Base 


 protected void Button1_Click(object sender, EventArgs e)
    {
        string tbl = "demoTbl";

        con = new SqlConnection(conStr);

        string cmdStr = "create table " + TextBox1.Text.Trim() + "(" + TextBox2.Text.Trim() + " " + TextBox3.Text.Trim() + "(" + TextBox4.Text.Trim() + ")," + TextBox5.Text.Trim() + " " + TextBox6.Text.Trim() + "(" + TextBox4.Text.Trim() + "))";


        cmd = new SqlCommand(cmdStr, con);

        con.Open();
       
        cmd.ExecuteNonQuery();
        con.Close();

    }

No comments:

Post a Comment

GRIDVIEW ON ROW DATA BOUND EVENT

 Database Create  Student : roll , name , city , cost  Fix 6 Value  in Database Record  ====================================================...