错误类型:ADODB.Command (0x800A0D5D)应用程序在当前操作中使用了错误类型的值。 10

<%@LANGUAGE="VBSCRIPT"CODEPAGE="65001"%><!--#includefile="../Connections/dsnforum.asp... <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/dsnforum.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd

Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_dsnforum_STRING
MM_editCmd.CommandText = "INSERT INTO bbsref (bbsrefname, bbsrefsex, bbsrefmail, bbsrefurl, bbsrefcontent) VALUES (?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("bbsrefname")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("bbsrefsex")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 255, Request.Form("bbsrefmail")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 255, Request.Form("bbsrefurl")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 203, 1, 1073741823, Request.Form("bbsrefcontent")) ' adLongVarWChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "forum.asp"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Dim rsmain__MMColParam
rsmain__MMColParam = "1"
If (Request.QueryString("bbsID") <> "") Then
rsmain__MMColParam = Request.QueryString("bbsID")
End If
%>
<%
Dim rsmain
Dim rsmain_cmd
Dim rsmain_numRows

Set rsmain_cmd = Server.CreateObject ("ADODB.Command")
rsmain_cmd.ActiveConnection = MM_dsnforum_STRING
rsmain_cmd.CommandText = "SELECT bbsID FROM bbsmain WHERE bbsID = ?"
rsmain_cmd.Prepared = true
rsmain_cmd.Parameters.Append rsmain_cmd.CreateParameter("param1", 5, 1, -1, rsmain__MMColParam) ' adDouble(这一行错误。)

Set rsmain = rsmain_cmd.Execute
rsmain_numRows = 0
%>
展开
 我来答
mauritius123
2011-06-14 · TA获得超过108个赞
知道小有建树答主
回答量:252
采纳率:0%
帮助的人:129万
展开全部
rsmain_cmd.ActiveConnection
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式