28,409
社区成员




<%
news_id = Request.QueryString("news_id")
If Not isNumeric(news_id) Then
Response.Write "无效字符"
Response.End
End If
dim conn
set conn = server.createobject("adodb.connection")
conn.open = "provider=microsoft.jet.oledb.4.0;" & "data source = " & server.mappath("../../newstest.mdb")
set rs = createobject("adodb.recordset")
rs.cursorLocation = 3
rs.open "select * from news where id=" & news_id
If not (rs.eof and rs.bof) Then
response.write Replace(rs("content"),VBCrLf,"<br>")
End If
If rs.state<>0 Then rs.close
set rs = nothing
conn.close
set conn = nothing
%>
dim id
id = Request("id")
if not isnumeric(id) or id="" then id=0
...
sql="select * from news where [id]="&id
...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/mynews.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
dim id
id=request("id")
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_mynews_STRING
Recordset1.Source = "SELECT * FROM news where news_id="&id
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档 </title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<%=(Recordset1.Fields.Item("bigclass").Value)%>
</form>
<form id="form2" name="form2" method="post" action="">
<p align="center"> <%=(Recordset1.Fields.Item("news_subject").Value)%> </p>
<p align="right"> <%=(Recordset1.Fields.Item("news_faburen").Value)%> </p>
</form>
<form id="form3" name="form3" method="post" action="">
<%=(Recordset1.Fields.Item("news_content").Value)%>
</form>
<form id="form4" name="form4" method="post" action="">
<div align="right"> <%=(Recordset1.Fields.Item("news_adddate").Value)%>
</div>
</form>
<p> </p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/mynews.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
dim id
id=request("id")
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_mynews_STRING
Recordset1.Source = "SELECT * FROM news where id="&id
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档 </title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<%=(Recordset1.Fields.Item("bigclass").Value)%>
</form>
<form id="form2" name="form2" method="post" action="">
<p align="center"> <%=(Recordset1.Fields.Item("news_subject").Value)%> </p>
<p align="right"> <%=(Recordset1.Fields.Item("news_faburen").Value)%> </p>
</form>
<form id="form3" name="form3" method="post" action="">
<%=(Recordset1.Fields.Item("news_content").Value)%>
</form>
<form id="form4" name="form4" method="post" action="">
<div align="right"> <%=(Recordset1.Fields.Item("news_adddate").Value)%>
</div>
</form>
<p> </p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>