I have seen a database operation class of the author for a long time. I found that the author has released easyasp some time ago. The current version is 2.1 beta, which is very well written, many common functions and operations have been simplified to facilitate rapid development. In the past, I just caught a copy of the source code. Now, let's take a look and learn! Most developers often have their own function libraries and common component libraries, which are constantly expanded and strengthened with accumulation.
The author has a habit of extracting N source codes from the Internet and then researching them.CodeAnd learning implementation ideas, I believe most developers have such a hobby! The following section shows the paging test code of easyasp, Which is concise:
-
- <! -- # Include file ="EASP. asp"-->
-
- <%
-
- Dim Conn
-
- Set conn = EASP. DB. openconn (1,"Data/# dB. mdb","")
-
- EASP. DB. dbconn = Conn
-
- Dim RS, I
- Set rs = EASP. DB. GPR ("1: P: 10","Select * from article")
-
- While not Rs. EOF and I <Rs. pagesize
-
- EASP. wn RS ("Art_title")
-
- I = I + 1
-
- Rs. movenext
-
- Wend
-
- EASP. C (RS)
-
- EASP. wc easp. DB. getpager ("Base")
-
- EASP. C (conn)
-
- %>
Attached:
interested can download to the http://code.google.com/p/easyasp/, the Code has a lot of places worth reference, of course, used to do the actual development is also good!