ASP判断的问题,郁闷了!判断不出来!
HTML code:
dim jf
set conn=server.createobject("adodb.connection")
connstr="Driver={Sql Server};Server="&Sqlip&";Database="&Sqldb&";Uid="&SqlUid&";Pwd="&SqlPwd&";"
conn.Open connstr
Set RS=Conn.Execute("SELECT sum(cs) as ok from aaa WHERE (bbb='abc')")
jf=rs("ok")
if jf="" then
response.write"<script>alert('你没有分数!');history.go(-1);</Script>"
response.end
End If
当记录里abc不存在时
和应该是空的啊!
我这个怎么判断不出来啊!
if jf=null then
试过了!不行!
if jf=0 then
if jf=0 then ?
if isnull(jf) then ?
if isempty(jf) then ?
if isnull(jf) then
试试
先 trim 后再判断。
sum(cs)
出来的是0不是null
if jf="" then
改为
if jf=o then
if IsNull(jf) then
相关问答:
asp虚拟主机实现伪静态的方法:
1、 重写url参数
Step1: 建立前台文件index.asp,修改url参数形式。由于读取数据库中的记录不是专题的重点,故直接给出:
<!--#include file="config.asp" -->
&l ......
C# code:
SqlConnection conn = CsDB.sqlcon();
SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......
Microsoft JET Database Engine '80040e07'
标准表达式中数据类型不匹配。
\wwwroot\update.asp, line 20
--------------------------------------------------------------------------------
Ho ......
SQL code:
rs.open "select * from guide where city_name='北京' order by pai desc",conn,1,1
do while not rs.eof or rs.bof
。。
。。
。。
rs.movenext
loop
这个sql语句在wap站里 本身有 ......