我们有一个旧网站,我们正试图复活。一切都有效,除了这一页
错误:-2147217900 - [Microsoft] [ODBC SQL Server驱动程序] [SQL Server]
过程或函数sp_XXXX_XXX_Order_Information指定了太多参数。Microsoft VBScript运行时错误' 800a01a8'
需要的对象:' openRecordSet(...)' /admin/XXXX/order_info.asp,第11行
<!--#include virtual="/includes/scripts/functions.asp"-->
<%
SetUserLevel(" 2 3 8 ")
QSON = prepareSQL(Request.QueryString("ON"))
If (Len(QSON) = 0) Then Response.Redirect("/admin/customercare/")
Dim objConnection, objRecordset, BGColor, CC_Count, PP_Count, Ticket_Count, Tracking_Count, History_Type, User_Notes, UID, Trouble_Tickets
Set objConnection = openConnectionAdmin()
Set objRecordset = openRecordset("EXEC sp_XXXX_XXX_Order_Information '" & QSON & "'," & Session("User_ID"), objConnection)
If (objRecordset.State = 0) Then
Set objRecordset = Nothing
Set objConnection = Nothing
Response.Write("Order Not Found")
Response.End
End If
UID = objRecordset("User_ID")
CC_Count = objRecordset("Credit_Card_Count")
VS_Count = objRecordset("VeriSign_Count")
PP_Count = objRecordset("PayPal_Count")
Tracking_Count = objRecordset("Tracking_Numbers")
User_Notes = objRecordset("User_Notes")
Trouble_Tickets = objRecordset("Trouble_Tickets")
History_Type = objRecordset("History_Type_ID")
Set objRecordset = objRecordset.NextRecordset()
If (objRecordset.State = 0) Then
Set objRecordset = Nothing
Set objConnection = Nothing
Response.Write("Order Not Found")
Response.End
End If
%>
<HTML>
<TITLE>iXXXX.XX- Customer Care Center</TITLE>
<HEAD>
<LINK REL="STYLESHEET" HREF="/admin/subpage.css" TYPE="text/css">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function popUp2(url, height, width)
{
sealWin=window.open(url,"win",'height=' + height + ',width=' + width + ', toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1');
self.name = "mainWin";
}
function charcount()
{
if (DH)
{
cr = fd('cd',0)
ct = document.Note.Note_Detail.value.length;
if (ct > 2000) cr.innerHTML = '<FONT COLOR="#660000">' + ct + ' characters (of 2000)</FONT>';
else if (ct > 1800) cr.innerHTML = '<FONT COLOR="#666600">' + ct + ' characters (of 2000)</FONT>';
else cr.innerHTML = ct + ' characters (of 2000)';
}
}
//-->
</SCRIPT>
<!--#include virtual="/admin/includes/info_popin.inc"-->
<!--#include virtual="/admin/includes/edit_fields.inc"-->
<DIV ID="info_popin" CLASS="tip"><TABLE><div style='position:relative;bottom:75px;left:150px;padding:1px;background-color:#EEEEEE; font-family: arial; font-size: 10pt;'></div></TABLE></DIV>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<!--#include virtual="/admin/includes/customercareheader.inc"-->
<P>
<FORM NAME="Shipping" METHOD=POST ACTION="order_shipping_update.asp">
<INPUT TYPE=HIDDEN NAME=ON VALUE="<%= QSON %>">
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH COLSPAN="3">Order #<%= QSON %><BR><BR></TH></TR>
<TR>
<%
Response.Write objRecordset("TableRow")
Set objRecordset = objRecordset.NextRecordset()
%>
</TR>
<TR><TD COLSPAN="3" ALIGN="CENTER"><DIV ID=sd STYLE="display: none;"><INPUT TYPE=BUTTON ONCLICK="document.Shipping.reset(); history.go();" VALUE="Cancel"> <INPUT TYPE=SUBMIT VALUE="Update"></DIV></TD></TR>
</TABLE>
</FORM>
</P>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH ALIGN="LEFT">Product</TH><TH ALIGN="LEFT">Dosage</TH><TH>Count</TH><TH>Quantity</TH><TH ALIGN="RIGHT">Amount</TH></TR>
<%
Do Until objRecordset.EOF
BGColor = IIF(BGColor = "DEDEDE", "EFEFEF", "DEDEDE")
Response.Write "<TR BGCOLOR=""" & BGColor & """>" & objRecordset("TableRow") & "</TR>" & vbCrLf
objRecordset.MoveNext
Loop
%>
</TABLE>
</P>
<%
If (Tracking_Count > 0 And (History_Type = 13 OR History_Type = 24)) Then
%>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH ALIGN="LEFT">Billed</TH><TH ALIGN="LEFT">UPS Tracking Number</TH><TH ALIGN="RIGHT">Notification Email</TH></TR>
<%
Set objRecordset = objRecordset.NextRecordset()
Do Until objRecordset.EOF
BGColor = IIF(BGColor = "DEDEDE", "EFEFEF", "DEDEDE")
Response.Write "<TR BGCOLOR=""" & BGColor & """>" & objRecordset("TableRow") & "</TR>" & vbCrLf
objRecordset.MoveNext
Loop
%>
</TABLE>
</P>
<%
End If
%>
<%
If (PP_Count > 0) Then
%>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH ALIGN="LEFT">Date</TH><TH ALIGN="LEFT">PayPal Account</TH><TH ALIGN="LEFT">Status</TH><TH ALIGN="LEFT"><BR></TH><TH ALIGN="RIGHT">Amount</TH></TR>
<%
Set objRecordset = objRecordset.NextRecordset()
Do Until objRecordset.EOF
BGColor = IIF(BGColor = "DEDEDE", "EFEFEF", "DEDEDE")
Response.Write "<TR BGCOLOR=""" & BGColor & """>" & objRecordset("TableRow") & "</TR>" & vbCrLf
objRecordset.MoveNext
Loop
%>
</TABLE>
</P>
<%
End If
%>
<%
If (CC_Count > 0) Then
%>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH ALIGN="LEFT">Date</TH><TH ALIGN="LEFT"><NOBR>Credit Response</NOBR></TH><TH ALIGN="CENTER" COLSPAN="2">AVS and CVV2 Responses</TH><TH ALIGN="RIGHT">Amount</TH></TR>
<%
Set objRecordset = objRecordset.NextRecordset()
Do Until objRecordset.EOF
BGColor = IIF(BGColor = "DEDEDE", "EFEFEF", "DEDEDE")
Response.Write "<TR BGCOLOR=""" & BGColor & """>" & objRecordset("TableRow") & "</TR>" & vbCrLf
objRecordset.MoveNext
Loop
%>
</TABLE>
</P>
<%
End If
%>
<%
If (VS_Count > 0) Then
%>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH ALIGN="LEFT">Date</TH><TH ALIGN="LEFT">Reference</TH><TH ALIGN="CENTER">Result</TH><TH>AVS</TH><TH>Type</TH><TH ALIGN="RIGHT">Amount</TH></TR>
<%
Set objRecordset = objRecordset.NextRecordset()
Do Until objRecordset.EOF
BGColor = IIF(BGColor = "DEDEDE", "EFEFEF", "DEDEDE")
Response.Write "<TR BGCOLOR=""" & BGColor & """" & objRecordset("TableRow") & "</TR>" & vbCrLf
objRecordset.MoveNext
Loop
%>
<TR><TD COLSPAN="6" ALIGN="CENTER" STYLE="font-size: 8pt;">Only transactions in <B>BOLD</B> have been accepted and processed.</TD></TR>
</TABLE>
</P>
<%
End If
%>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH COLSPAN="2">Order Questionnaire</TH></TR>
<%
Set objRecordset = objRecordset.NextRecordset()
Do Until objRecordset.EOF
BGColor = IIF(BGColor = "DEDEDE", "EFEFEF", "DEDEDE")
Response.Write "<TR BGCOLOR=""" & BGColor & """>" & objRecordset("TableRow") & "</TR>" & vbCrLf
objRecordset.MoveNext
Loop
%>
</TABLE>
</P>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH COLSPAN="3">Notes Created on this Order</TH></TR>
<TR><TH ALIGN="LEFT">Date</TH><TH ALIGN="LEFT">Short Detail</TH><TH ALIGN="RIGHT">Author</TH></TR>
<%
If (User_Notes > 0) Then
Set objRecordset = objRecordset.NextRecordset()
Do Until objRecordset.EOF
BGColor = IIF(BGColor = "DEDEDE", "EFEFEF", "DEDEDE")
Response.Write "<TR BGCOLOR=""" & BGColor & """>" & objRecordset("TableRow") & "</TR>" & vbCrLf
objRecordset.MoveNext
Loop
Else
Response.Write "<TR><TD COLSPAN=""3"" ALIGN=""CENTER"">There are no notes on this account.</TD></TR>"
End If
%>
<TR>
<TD COLSPAN="3">
<DIV ID=no ALIGN="CENTER" STYLE="font-size: 8pt;"><A ONCLICK="edit('no','ns');"><BR>Add Note to this Client</A></DIV>
<DIV ID=noe STYLE="display: none;">
<FORM NAME="Note" METHOD=POST ACTION="customer_add_note.asp">
<INPUT TYPE=HIDDEN NAME=UID VALUE="<%= UID %>">
<INPUT TYPE=HIDDEN NAME=ON VALUE="<%= QSON %>">
<BR><B>Adding Note</B>:<BR>
<TEXTAREA NAME="Note_Detail" COLS=50 ROWS=5 STYLE="width:580px;" ONKEYUP="charcount();"></TEXTAREA>
<DIV ID=cd ALIGN="CENTER">0 characters (of 2000)</DIV>
<DIV ID=ns STYLE="display: none;" ALIGN="CENTER"><INPUT TYPE=RESET VALUE="Clear"> <INPUT TYPE=SUBMIT VALUE="Add Note"><BR><BR></DIV>
</FORM>
</DIV>
</TD>
</TR>
</TABLE>
</P>
<%
If (Session("User_Level") = " 1 ") Then
%>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR>
<TD>
<DIV ID=de ALIGN="CENTER" STYLE="font-size: 8pt;"><A ONCLICK="edit('de','ds');">Send Pre-made Decline to this Client</A></DIV>
<DIV ID=dee STYLE="display: none;">
<CENTER><B>Send Decline</B></CENTER>
<FORM NAME="DeclineLetter" METHOD=POST ACTION="customer_send_decline.asp">
<INPUT TYPE=HIDDEN NAME=ON VALUE="<%= QSON %>">
<P STYLE="margin-left: 30px;">
<%
Dim objDeclineRecordset
Set objDeclineRecordset = openRecordset("EXEC sp_Doctor_Get_Declines", objConnection)
Do Until objDeclineRecordset.EOF
Response.Write objDeclineRecordset("OptionRow") & vbCrLf
objDeclineRecordset.MoveNext
Loop
objDeclineRecordset.Close
Set objDeclineRecordset = Nothing
%>
</P>
<DIV ID=ds STYLE="display: none;" ALIGN="CENTER"><INPUT TYPE=SUBMIT VALUE="Send"><BR><BR></DIV>
</FORM>
</DIV>
</TD>
</TR>
</TABLE>
</P>
<%
End If
%>
<P>
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" CLASS="CCListTbl">
<TR><TH COLSPAN="4">Trouble Tickets on this Order</TH></TR>
<TR><TH ALIGN="LEFT">Date</TH><TH ALIGN="LEFT">Ticket</TH><TH ALIGN="LEFT">Last Short Detail</TH><TH></TH><TH ALIGN="RIGHT">Last Author</TH></TR>
<%
If (Trouble_Tickets > 0) Then
Set objRecordset = objRecordset.NextRecordset()
Do Until objRecordset.EOF
BGColor = IIF(BGColor = "DEDEDE", "EFEFEF", "DEDEDE")
Response.Write "<TR BGCOLOR=""" & BGColor & """>" & objRecordset("TableRow") & "</TR>" & vbCrLf
objRecordset.MoveNext
Loop
Else
Response.Write "<TR><TD COLSPAN=""5"" ALIGN=""CENTER"">There are no trouble tickets on this order.</TD></TR>"
End If
%>
<TR><TD COLSPAN="5" ALIGN="CENTER"><BR><A HREF="trouble/add_ticket.asp?UID=<%= UID %>&ON=<%= QSON %>" STYLE="font-size: 8pt;">Create a New Trouble Ticket for this Order</A></TD></TR>
</TABLE>
</P>
<BR><BR><BR><BR><BR><BR><BR><BR>
</BODY>
</HTML>
<%
objRecordset.Close
Set objRecordset = Nothing
Set objConnection = Nothing
%>
答案 0 :(得分:0)
因此,您的错误表明在此行上调用存储过程的参数太多:
EXEC sp_XXXX_XXX_Order_Information '" & QSON & "'," & Session("User_ID")
我会反复检查数据库中的存储过程sp_XXXX_XXX_Order_Information
。它应该接受QSON
和UserID
(或类似)的2个变量。
此外,我会检查您(a)在该行上调用存储过程的QSON
和Session("User_ID")
的值。
我还要检查这两个变量的值是否需要消毒。例如,如果QSON
的值为test','ing
,则可能会无意中添加另一个变量。你需要逃避这些。