在窗体上有一个SAME的LABLE框. 本意想把这条语句的反回值显示到框中.但总是提示无效的函数.各位帮帮忙吧.我在线等.先谢谢了. Dim sumdate As Database SAME.Caption = sumdate.Execute("SELECT COUNT(STATUS) FROM C WHERE STATUS='SAME'")
Execute是connecting对象有的方法.它返回的是个记录集不是字符串. dim conn as new adodb.connection dim rs as new adodb.recordeset conn.connectionstring="....." rs=conn.execute("SELECT COUNT(STATUS) FROM C WHERE STATUS='SAME'") SAME.Caption =rs.fields(0)