数据库检索有效性判断

<% If Not Recordset1.EOF Or Not Recordset1.BOF  Then
    dxgis=(Recordset1.Fields.Item("dxg").Value) 
End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF 
 If Recordset1.EOF And Recordset1.BOF Then
    dxgis=0 
End If ' end Recordset1.EOF And Recordset1.BOF 
%>
具体:
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
<% If Recordset1.EOF And Recordset1.BOF Then %>
    <div align="center">
    <span size="+2" style="color:#FF0000;">当前时刻<br />
    暂无读者提交采编数据!</span>
    </div>
<% End If ' end Recordset1.EOF And Recordset1.BOF %>

猜你喜欢

转载自www.cnblogs.com/sunyzone/p/12439156.html