<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECt * FROM ntype WHERe t_id = " + Replace(Recordset1__MMColParam, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
提示 第 158 行错误,就是Recordset1.Open(),我是新手,请指教?????
语法错误 (逗号) 在查询表达式 'n_id = 6, 11' 中。
答案:3 悬赏:20 手机版
解决时间 2021-01-29 23:21
- 提问者网友:心牵心
- 2021-01-28 23:13
最佳答案
- 五星知识达人网友:旧脸谱
- 2021-01-29 00:33
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("t_id") <> "") Then
Recordset1__MMColParam = Request.QueryString("t_id")
End If
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECt * FROM ntype WHERe t_id = " + Replace(Recordset1__MMColParam, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
如果你传递过来的参数是t_id的话(没看到你传递过来的参数)
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("t_id") <> "") Then
Recordset1__MMColParam = Request.QueryString("t_id")
End If
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECt * FROM ntype WHERe t_id = " + Replace(Recordset1__MMColParam, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
如果你传递过来的参数是t_id的话(没看到你传递过来的参数)
全部回答
- 1楼网友:由着我着迷
- 2021-01-29 01:41
Recordset1.Source = "SELECT * FROM ntype WHERe t_id in( " + Replace(Recordset1__MMColParam, "'", "''") + ")"
试下。
- 2楼网友:詩光轨車
- 2021-01-29 00:53
你好!
Recordset1.Source = "SELECt * FROM ntype WHERe t_id in( " + Replace(Recordset1__MMColParam, "'", "''") + ")"
试下。
希望对你有所帮助,望采纳。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯