例如:要将一张学生表中成绩90分以上的学生姓名依次显示在 Label1,Label2,Label3 
中,这样的sql语句怎么写?

解决方案 »

  1.   

    不明白楼主为什么这么做.
    sql中可以作为字符串输出"姓名1,姓名2,..."
    在程序中接受后作为数组处理.
      

  2.   

    其实你只要用select语句查询出这些数据,接下来的工作就是在程序中来编写了。
    先和数据库建立连接,然后执行查询语句
    sqlstr="select 姓名 from tb where 成绩>90"
    rs.open sqlstr,conn,1,1
    然后循环取出 姓名
    dim i as int,lab as string
    do while i>rs.count
    lab=label+str(i)
    lab.caption=rs.fields.item(i).value
    i=i+1
    loop具体还得在程序中调试。。
      

  3.   

    应该是
    do while i<rs.count