请问:如下ACCESS数据库连接代码段错误在那里?执行到OPEN()就出错
请问:如下ACCESS数据库连接代码段错误在那里?执行到OPEN()就出错
<!--#include file="../Connections/main.asp" -->
<%
colname = "title"
colvalue = "%"
colname = request.querystring("colname")
colvalue = request.querystring("colvalue")
%>
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_island_STRING
Recordset1.Source = "SELECT * FROM forum WHERE "& colname &" LIKE "& colvalue &" ORDER BY time DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
我是想通过这个代码实现动态SQL查询,
意思是按那列查询也由用户选择,但是当我把列做参数传入时就发生问题
请有做过这方面应用的给我指点
谢谢