timcadieux
Programmer
I'm using the below Function to build an Array of information to which I later Refer.
The Headline(x) array works perfectly fine, however, the Category array always gives me a Type Mismatch, even though, as you can see in the Function, I use response.write and it shows me all the categories no problem.
i'm thoroguhly confused as to why one works and not the other?
Here's how i display the info.
The Headline(x) array works perfectly fine, however, the Category array always gives me a Type Mismatch, even though, as you can see in the Function, I use response.write and it shows me all the categories no problem.
i'm thoroguhly confused as to why one works and not the other?
Code:
Function Testit(ByVal Lang)
If Not RS.EOF Then
i = 2 'Number of articles to store. Remember, "0" counts as one, therefore 2 equals 3.
x = 0
If RS.RecordCount < 3 Then i = 1
ReDim aHeadlines(i), aCategory(i)
For x = 0 to i
With RS.Fields
sID = .Item("ID").Value
sHeadline = .Item("Headline").Value
sCategory = .Item("Specific").Value
End With
aHeadlines(x) = sHeadline
aCategory(x)=sCategory
response.write(aCategory(x))
RS.MoveNext
Next
End If
End Function
Here's how i display the info.
Code:
<%
Call Testit(L)
%>
<%= aHeadlines(0)%>
<%= aCategory(0)>