天鑫洋金业有限公司:求助于编成高手!!(VB,数据库)

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/07 03:37:40
通过把表中一条记录的某个字段值设为0,使该记录其他字段值在查询时不显示,而只显示为0的那个字段,怎么半?

sql="select * from ....."
rs.open sql,conn,1,1

do while not rs.eof
if trim(rs("Flag"))="0" then
......这里只输出指定字段
else
.....输出其他字段
end if
rs.movenext
loop

dim i as integer
rs.open "select * from table",conn,1,1
if rs.recordcount<>0 then
do while not rs.eof
for i=0 to rs.field.count-1
doevents
if rs.field(i).value="0" then
debug.print rs.field(i).name & ":" & rs.field(i).value
end if
next
rs.movenext
loop
end if

select xxx from

updata set XX=0