为什么写入数据库的都是空值,连个0都没有?
<%
zhizid=request("flagb")
%>
<table width="877" height="154" align="center" border=1 cellspacing=0 cellpadding=0
style='border-collapse:collapse;border:none'>
<tr>
<td width="25%" align="center">高压侧</td>
<td width="15%" align="center">档位</td>
<td width="15%" align="center">A0</td>
<td width="15%" align="center">B0</td>
<td width="15%" align="center">C0</td>
<td width="15%" align="center">误差</td>
<tr>
<td width="25%"></td>
<td width="15%" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from zhiz where zhizid="&flagb
rs.open sql,conn,1,1
if not rs.eof or rs.bof then
rs.movefirst
response.write(rs("gdangwid"))
rs.movenext
end if
%>
</td>
<td width="15%" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from zhiz where zhizid="&flagb
rs.open sql,conn,1,1
if not rs.eof or rs.bof then
rs.movefirst
response.write(rs("gya0"))
rs.movenext
end if
%>
</td>
<td width="15%" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from zhiz where zhizid="&flagb
rs.open sql,conn,1,1
if not rs.eof or rs.bof then
rs.movefirst
response.write(rs("gyb0"))
rs.movenext
end if
%>
</td>
<td width="15%" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from zhiz where zhizid="&flagb
rs.open sql,conn,1,1
if not rs.eof then
rs.movefirst
response.write(rs("gyc0"))
rs.movenext
end if
%>
</td>
<td width="15%" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from zhiz where zhizid="&flagb
rs.open sql,conn,1,3
if not rs.eof or rs.bof then
rs.movefirst
dim ia,ib,ic,iw 'ia,ib分别为A,B相的数据.iw为误差,计算完毕将ic写入gwuc
ia=rs("gya0")
ib=rs("gyb0")
ic=rs("gyc0")
if ia>ib>ic then
iw=(ia-ic)/ic
else
if ia>ic>ib then
iw=(ia-ib)/ib
else
if ib>ia>ic then
iw=(ib-ic)/ic
else
if ib>ic>ia then
iw=(ib-ia)/ia
else
if ic>ib>ia then
iw=(ic-ia)/ia
else
if ic>ia>ib then
iw=(ic-ib)/ib
end if
end if
end if
end if
end if
end if
rs.addnew '新增加一条记录
rs("gwuc")=iw '将iw的值传给name字段
rs.update'写入完毕
end if
set rs=server.createobject("adodb.recordset")
sql="select * from zhiz where zhizid="&flagb
rs.open sql,conn,1,1
if not rs.eof or rs.bof then
rs.movefirst
response.write rs("gwuc")
rs.movenext
end if
%>
</td>
</tr>
</tr>
</table>
</table>
<table width="877" height="38" align="center" border=1 cellspacing=0 cellpadding=0 style='border-collapse:collapse;border:none'>
<tr>
<td width="17%" height="38" border="0" align="center" cellpadding="1" cellspacing="1">试验结论</td>
<td width="83%" height="38" border="0" align="center" cellpadding="1" cellspacing="1">判断合格与否</td>
</tr>
</table>