这段ASP代码有什么问题?

来源:百度知道 编辑:UC知道 时间:2024/07/03 04:06:35
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/conn.asp" -->
<%
Dim Recordset1__mmcolparam
Recordset1__mmcolparam = "1"
If (session("mm_username") <> "") Then
Recordset1__mmcolparam = session("mm_username")
End If
%>
<%
Dim Recordset1__mmcolparam2
Recordset1__mmcolparam2 = "1"
If (session("mm_username") <> "") Then
Recordset1__mmcolparam2 = session("mm_username")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_conn_STRING
Recordset1_cmd.CommandText = "select * from chat where name=? or toname=? or toname='all'"
Recordset1_cmd.Prepared = true

这样的代码不想多看了,用dw生成代码遇到问题的太多。

dw生成代码本身问题多多。你在网上找个asp代码,复制改下吧。
效果会比你用dw生成好。

楼上从何处一眼就能看出是DW生成的呢?我怎么就看不出?楼上是神人?

我从代码中看到了两个<table>的开头却只看到了一个table的结尾!此外SQL语句中的?不能让人理解,难道楼主是想用通配符而进行模糊查询?我想应该使用的是like句而非直接使用?吧?否则会出现什么样的结果呢?

看这么冗长的东西,的确是某个软件生成的,并不能确定是什么软件生成的.但从两个table开始以一个table结束上来讲,又不像是生成的,因为没有哪个软件会犯这么低级的错误!

1楼很天才啊