
December 12th, 2002, 12:28 PM
|
|
Contributing User
|
|
Join Date: Apr 2002
Location: The Great White North
Posts: 361
Time spent in forums: 58 m 50 sec
Reputation Power: 7
|
|
Type Mismatch Error - 800A000D
I'm getting the following error
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'NumOfSubs'
/filename.asp, line 153
Here's line 153
Code:
<% If NumOfSubs(objRSM("CourseID")) < 1 Then %>
It is supposed to be calling a function NumOfSubs(ParentID)
Code:
<%
Function NumOfSubsM(ParentID)
strSubCounterM = "SELECT Count(CourseID) as SubNumber
FROM tbl_Courses WHERE Parent=" & ParentID
Set objSubCounterM = objconn.execute(strSubCounterM)
if not objSubCounterM.eof then
NumOfSubsM = objSubCounterM("SubNumber")
else
NumOfSubsM = 0
end if
objSubCounterM.Close
Set objSubCounterM = Nothing
End Function
%>
However, it could be that vbscript is expecting the code to asign a value to the first element of an array "NumOfSubs." That's according to aspfaq.com
Does anyone know a way around this? I need it to call the function. This code worked fine on Access but now I'm having a problem migrating it to SQL server.
Thanks in advance
|