我用ADODB控件连接数据库的
dim num as integer
dim str as string
str="select 成绩 from student where 学号=12"
问:
我想把查询出的成绩赋值给num,有什么好的方法呀?
dim num as integer
dim str as string
str="select 成绩 from student where 学号=12"
问:
我想把查询出的成绩赋值给num,有什么好的方法呀?
conn.open connectionstring
rs.open str,conn,1,1
if rs.recordcount>0 then
num=rs.fields(0)
else
num=0
end if