如题?各位大侠帮帮忙啊~~

解决方案 »

  1.   

    Try this:SqlCommand myCommand = new SqlCommand("create table temp('ID', int)...", myConnection);
        myCommand.Connection.Open();
        myCommand.ExecuteNonQuery();
        myConnection.Close();
      

  2.   

    string strconn="server=(local);database=TaskVision;user=sa;pwd=123";

    SqlConnection conn=new SqlConnection(strconn);
    SqlCommand cmd= new SqlCommand("create table temp('ID', int)...", conn);
        cmd.Connection.Open();
        cmd.ExecuteNonQuery();
        conn.Close();
      

  3.   

    要是SQL Server 2005有个SQL Management Objects (SMO) API就easy 多了