如题

解决方案 »

  1.   

    SqlConnection newSQLConnection = new SqlConnection("server=127.0.0.1;database=OrderForm;User ID=sa;Password=;");
    newSQLConnection.Open();   //连接数据库SqlCommand newSQLCommand = new SqlCommand("添加,修改,删除的SQL语句",newSQLConnection);
    newSQLCommand.ExecuteNonQuery();//执行SQL语句
      

  2.   

    http://blog.csdn.net/zhaoxiaoyang5156/archive/2007/05/26/1627177.aspx
      把这个例子吃了。。你就会了。
      

  3.   

    SqlConnection newSQLConnection = new SqlConnection("server=127.0.0.1;database=OrderForm;User ID=sa;Password=;");
    newSQLConnection.Open();   //连接数据库SqlCommand newSQLCommand = new SqlCommand("添加,修改,删除的SQL语句",newSQLConnection);
    newSQLCommand.ExecuteNonQuery();//执行SQL语句
    楼上的兄弟说得对!
    补充一下:
    SqlDataAdapter adp = new SqlDataAdapter(sql, conn);
    填充dataset datatable 时要用到的