先用OLEADAPTER 生成OLECONNECTION。然后再用ADAPTER中的四个命令就可以了

解决方案 »

  1.   

    写存储过程,我有个购物车的例子,业务逻辑都是存储过程,源代码里没有一句sql语句,程序只管传参数过去。要就留个地址。现在发现一个DBA是多么的不容易。
      

  2.   

    [email protected]
    thanks a lot
      

  3.   

    SqlCommand Sqlc=new SqlCommand(xxx, Sqlconnection);
      其中的***你可以写成好几个sql语句 
    例如  
      SqlCommand Sqlc=new SqlCommand("select col1 from a;select col2 from b;, Sqlconnection);
    读的时候看看 msdn的  SqlDataReader.NextResult 方法 
    ----
    如果我没有理解错楼主的意思的话
      

  4.   

    SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
    SqlCommand myCommand = new SqlCommand("CMRC_CustomerDetail", myConnection);myCommand.CommandType = CommandType.StoredProcedure;// ....Add Parameters to SPROC...myConnection.Open();
    myCommand.ExecuteNonQuery();
    myConnection.Close();