错误类型: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
%> 展开
<!--#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
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询