<!--#include file= "config.asp"-->
<ol>
<%
Set rs=server. CreateObject ("Adodb.recordset")
sql= "select * from Article"
Rs.Open Sql,conn, 1,1
do rs.eof
%>
<li><a href= "Article.asp?/<%=rs (" id ")%>.html" ><%=left (Trim (rs ("title"))%></a></li>
<%
rs.movenext
loop
Rs.close
Set rs=nothing
%>
</ol>
<%
' Source: Network
Id=request. QueryString ("id")
If id= "" Then
Server_v40=request.servervariables ("Query_string")
Id=int (replace (SERVER_V40, "/", ""), ". html", "")
End If
Call Readnews ()
%>
<div>
Title: <b><%= news_title%></b><br/>
Content: <%=News_content%>
</div>
' URL:. NET tutorial ' >www.111cn.net
' Source: Network
' Database Tutorial Links
db= "Data.mdb"
Set conn = Server.CreateObject ("ADODB. Connection ")
Connstr= "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Server.MapPath (DB)
Conn.Open ConnStr
If ERR Then
Err. Clear
Set conn = Nothing
Response.Write "Database connection error, please check the connection string. "
Response.End
End If
' Define the reading of the news reading interface
Dim news_title,news_content
Sub Readnews ()
Set Rs1=server.createobject ("Adodb.recordset")
sql1= "Select Id,title,content from article where id=" & ID
Rs1.open sql1,conn,3,3
News_title=rs1 ("title")
News_content=rs1 ("content")
Rs1.close
Set rs1=nothing
End Sub
%>