获取RecordSet时键入Mismatch VBScript Error

时间:2014-03-11 08:57:50

标签: forms vbscript recordset

我正在研究一些用Classic ASP / VBSCript编写的遗留代码。

代码处理通过HTML表单提交的数据,并在以下行中断。

' Get all input questions
Set inputQuestions = getListOfInputQuestionsForPage("additional")

函数getListOfInputQuestionsForPage(pageName)定义如下:

Function getListOfInputQuestionsForPage(pageName)
    ' Instantiate Command
    Set objCommand = Server.CreateObject("ADODB.Command")

    ' Inform Command what Connection to use.
    Set objCommand.ActiveConnection = myConn

    ' SQL Query to run
    objCommand.CommandText = "SELECT QUESTION_TABLE.PK_QUESTION AS ""QUESTION_ID"", QUESTION_TABLE.QUESTION AS ""QUESTION"", QUESTION_TABLE.INPUT_TYPE AS ""TYPE"", QUESTION_TABLE.IS_FOR_ALL_CUSTOMERS AS ""FOR_ALL_CUSTOMERS"" FROM QUESTION_TABLE WHERE QUESTION_TABLE.DISPLAY_PAGE = '" & pageName & "' ORDER BY PK_QUESTION ASC"

    ' Execute SQL and return result
    Set getListOfInputQuestionsForPage = objCommand.Execute()
End Function

我发现我收到以下错误很奇怪:

Microsoft VBScript runtime  error '800a000d'

Type mismatch: 'getListOfInputQuestionsForPage' 

/site/path_to_file/edit_additional.asp, line 110

我所做的就是尝试从数据库中获取一些数据。我知道数据存在并且返回了RecordSet。

0 个答案:

没有答案