VB代码解读!帮忙!菜鸟学习中!

来源:百度知道 编辑:UC知道 时间:2024/06/08 02:56:27
<%
rs.open "select top 1 title,articleid,Nkey from article where nclassid=37 order by articleid desc",conn,1,1
do while not rs.eof
%>

这不是一个完整的程序代码呀?如何解读?
只能简单的解释一下里面定义的变量:

rs.open "select top 1 title,articleid,Nkey from article where nclassid=37 order by articleid desc",conn,1,1
以上的作用是打开一个记录集,通过SQL语法("select top 1 title,articleid,Nkey from article where nclassid=37 order by articleid desc":搜索一些字段,并按照降序排列.)用来获取数据库里的指定数据.

do while not rs.eof
这个是指一个循环,意思是循环到记录集的末尾时退出DO WHILE循环.

vb?
冒汗...

这是ASP的东东吧.意思和楼上的差不多,不管什么语言的SQL语句都差不多,所以找本SQL的书把前几章看下就可以进行应用了.