麻烦大侠们帮我看看这个Type mismatch咋整 ? 谢谢啦~
错误提示:Microsoft VBScript runtime error '800a000d'
Type mismatch: 'getReplacementQuestions'
我的代码(出错的行我用粗体标出来了,NomID的type是autonumber):
<%
dim id
id = Trim(request.querystring("id"))
id = Replace(id, "'", "''")
Dim PageTitle
Dim PageBody
Dim InvalidId
InvalidId = False
If Not (id = "" Or Len(id) <= 2) Then
InvalidId = True
PageTitle = "This is not a valid ballot item"
PageBody = "Please email Mary Wilke at wilke@crl.edu if you believe there is a problem with the Purchase Proposal Ballot"
Else
dim objRS, strQ
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection = Connection
strQ = "SELECT NomID, Letter, Title, PubName, PubURL, CountPricing, Subjects, Notes, Background, NomComments, CRLComments "
strQ = strQ & "FROM NominationDetailsCurrent "
strQ = strQ & "WHERE Letter = '"&id&"' "
objRS.Open strQ
If objRS.bof And objRS.eof Then
InvalidId = True
PageTitle = "This is not a valid ballot item"
PageBody = "Please email Mary Wilke at wilke@crl.edu if you believe there is a problem with the Purchase Proposal Ballot"
Else
PageTitle = "Nomination Details"
'strip page break from long urls
Dim regEx
Set regEx = New RegExp
regEx.Global = true
regEx.Pattern = "<br/>"
If Not isnull(objRS("PubURL")) And objRS("PubURL") <> "" Then
Dim PubURL
PubURL = objRS("PubURL")
PubstripURL = regEx.replace(PubURL, "")
End If
NomID = objRS("NomID")
' Define some variables to tell us if we have replacement or supplemental questions.
Dim intReplacementQuestionCount, intSupplementalQuestionCount
intReplacementQuestionCount = 0
intSupplementalQuestionCount = 0
' Finally, define some arrays to hold the replacement/supplementary questions
Dim arrReplacementQuestions, arrSupplementalQuestions
' Get any replacement questions
arrReplacementQuestions = getReplacementQuestions(NomID)
If UBound(arrReplacementQuestions) > 0 Then
intReplacementQuestionCount = UBound(arrReplacementQuestions, 2) + 1
End If
' Get any supplemental questions (provided there aren't replacement questions
If intReplacementQuestionCount = 0 Then
arrSupplementalQuestions = getSupplementalQuestions(NomID)
If UBound(arrSupplementalQuestions) > 0 Then
intSupplementalQuestionCount = UBound(arrSupplementalQuestions, 2) + 1
End If
End IF
End if
End If
%>