用string 读取能读全吗?读全怎么用?

解决方案 »

  1.   

    --showstring strQuery="select ntext from tb where id=1";
    oText.InnerText=(string)SqlHelper.ExecuteScalar(strConn,CommandType.Text,strQuery); --update 
    string strCmd="update tb set ntext=@content where id=1";
    int ret=0;
    SqlParameter[] param=new SqlParameter[]{
       SqlHelper.MakeInParam("@content",SqlDbType.NText,0,oText.InnerText)
       };
    try
    {
    ret=(int)SqlHelper.ExecuteNonQuery(strConn,CommandType.Text,strCmd,param);
    }
    catch(Exception ex)
    {
    Response.Write(ex.ToString());
    } if(ret!=0)
    {
    ShowText();
    }
    else
    {
    Response.Write("failure!");
    }
      

  2.   

    各位朋友的意思就是string就能完全读取,更新 ntext中存储的内容?