到这看看吧:
http://support.microsoft.com/default.aspx?scid=kb;zh-cn;310070&Product=vcSnet

解决方案 »

  1.   

    SqlParameter  param = new SqlParameter("@TitleOfCourtesy",SqlDbType.NVarChar,25));
    param.Value = "foo";
    cmd.Parameters.add(param);
      

  2.   

    SqlCommand cmd = new SqlCommand("sp_insertEmployee '" + TitleOfCourtesy + "', conn);
      

  3.   

    SqlCommand cmd=new SqlCommand("sp_insertEmployee",conn)
    cmd.CommandType=CommandType.StoredProcedure;
    cmd.Parameters.add(new SqlParameter("@TitleOfCourtesy",SqlDbType.NVarChar,25));
    cmd.Parameters["@TitleOfCourtesy"].Value = TitleOfCourtesy;