当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·关于crecordset::open()的操作    »显示摘要«
    摘要: 请问我在crecordset::open()为缺省的情况下执行程序会出现非法操作,当在open()内加入数据表名称后就无事,为什么? getdefaultsql是否只能在sql的数据库时才能传递数据表名称?我用的是vfp。 ......
    摘要: 我用的是linux server、apache、tomcat 中文传递参数怎么传递不过去了。 如:http://path/aa.jsp?param=中国 我用string para = request.getparameter(param);得不到值。如果把“中国”换为"china"就可以了。。 请教哥们。用参数 怎么才能传过去? 我不想用session传值! 说明: ......


用户登陆后,把帐号放入session中,怎么样判断我输入的AccountId(string)不为空

String   valid   =   (String)   session.getValue("AccountId");  
  if   (valid!=null){  
  ...........  
  ...........  
  ...........  
  }  
   
  为什么老是出错???????而且如果在页面中操作数据库的时候,每刷新一次都加一条空记录。我加上if(sno!=""){.......}也不行。  
   
  这个问题困扰我很长时间了,那位大哥帮帮忙。谢了!

NO.1   作者: leshui

String   myAdvice=(String)session.getAttribute("advice");  
    if(!(myAdvice==null))  
    {  
      session.removeAttribute("advice");  
    }

NO.2   作者: lwd2k

先  
  if(session.getAttribute("advice")   ==   null)  
  {  
          ;  
  }  
  else  
  {  
          String   myAdvice=(String)session.getAttribute("advice");  
  }

NO.3   作者: eterne

你要先判断一下session中有没有那个attribute  
  在去取这个值  
  你光判断取倒的那个是否为空,没用的  
   
  很可能空指针错的

NO.4   作者: zhuxr2003

putValue,getValue只能获取字符及数字变量.  
  setAttribute,getAttribute是什么变量都能获取的.比如文档型,数组型等.


    摘要: dim filepath as string = "c://2003051585.pdf" dim strfilename = "2003051585.pdf" response.appendheader("content-disposition", "attachment; filename=" + h......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE