cmdPubs.CommandType = CommandType.StoredProcedure;
我怎么就的不到CommandType.StoredProcedure这个呢?
是不是还需要引用别的类?

解决方案 »

  1.   

    CommandType枚举,如果找不到就写全了:System.Data.CommandType.StoredProcedure
      

  2.   

    using System;
    using System.Data;
    using System.Data.SqlClient;namespace 
    {
       public class aa
    {
        cmdPubs.CommandType = CommandType.StoredProcedure;
    }
    }
      

  3.   

    to:yufenfeila
    你的代码在vs里正确吗?
    System.Data下有CommandType这个吗?
      

  4.   

    补充一句,我写的是WebForm代码
      

  5.   

    命名空间
    using System.Data;
    using System.Data.SqlClient;
      

  6.   

    to:yufenfeile
    你是对的
    多谢