Public Function ChkRStr(strV)                                    
  If (Not IsNull(strV)) Then
   ChkRStr=Replace(strV,"'","<li>'</li>")
  Else
   ChkRStr=""
  End If
 End Function          
www.360xianhua.com

解决方案 »

  1.   


    Public Function ChkRStr(strV)   //函数名称ChkRStr ,有一个参数strV
      If (Not IsNull(strV)) Then             //-- 判断参数strV 是否(不是NULL)
      ChkRStr=Replace(strV,"'","<li>'</li>")  //--Replace这个是替换函数,把参数strV里面含有(')单引号的替换成“<li>'</li>”
      Else                              //-- 如果是NULL
      ChkRStr=""                         //  --ChkRStr=""
      End If                            //--结束
     End Function   
      

  2.   

    select case when strV is not null then replace(strV,"'","<li>'</li>") else '' end 
      

  3.   


    Public Function ChkRStr(strV) //定义函数  
      If (Not IsNull(strV)) Then  //判断是否为null
      ChkRStr=Replace(strV,"'","<li>'</li>")  //如果非空就替换',为<li>'</li>
      Else                             //否则
      ChkRStr=""                       //赋值为""空串
      End If
     End Function   
      

  4.   

    VB 怎么在这里发,发错地方了吧,  函数 SQL create function ......