asp编程请教.

来源:百度知道 编辑:UC知道 时间:2024/06/05 15:11:36
本人刚学程序,有哪位高人,指点一下.
<%
id=1
if Request.QueryString("id")<>"" then
id=Request.QueryString("id")
end if
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open "select title,content from sd_notice where id="&id,conn,1,1
if not rs.eof then
title=rs("title")
content=rs("content")
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

这应该是一个读取通知的页面的ASP代码,ID就是通知代号,相当于在数据库中的标识,用SQL语句打开表sd_notice找到相应的数据读取出来。很简单很平常的一段代码。
新手若想在WEB编程这块发展的话,多去下一些源码来放到自己机子上调调 试,多去接触改动什么的,ASP源码网上最多了。