asp下如何在ADO服务器端利用好缓存技术?

2018-09-06 12:16

阅读:418

  请看下面示例,这是一个用来显示图书分类的例子程序:

displayBooks.asp
<%@LANGUAGE=JavaScript%>
<html>
<body>
<formmethod=post>
图书分类;<%=getBooksListBox()%>
<p>
<inputtype=submit>

<%
functiongetBooksListBox()
{
BooksListBox=Application(BooksListBox)
if(BooksListBox!=null)returnBooksListBox;
crlf=String.fromCharCode(13,10)
BooksListBox=<selectname=Books>+crlf;
SQL=SELECT*FROMBooksORDERBYName;
cnnBooks.Open(Books,Admin,);
rstBooks=cnnBooks.Execute(SQL);
fldBookName=rstBooks(BookName);
while(!rstBooks.EOF){
BooksListBox=BooksListBox+<option>+
fldBookName++crlf;
rstBooks.MoveNext();
}
BooksListBox=BooksListBox+
Application(BooksListBox)=BooksListBox

注意这句,Application技术的精华应哦
returnBooksListBox;
}
%>


评论


亲,登录后才可以留言!