I have a piece of code which is looping through a recordset, and also has a nested loop which trys to loop through an array, however apon executing this code I get this error
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'Lbound'
/commsform/admin_detail.asp, line 415
The array is definately not empty. This is how it is crerated
If objRSCampaignChannels.EOF AND objRSCampaignChannels.BOF Then
Do Until objRSCampaignChannels.EOF
RSCampaignChannels = RSCampaignChannels & objRSCampaignChannels("ChannelID") & " "
objRSCampaignChannels.MoveNext
Loop
objRSCampaignChannels.Close
Set objRSCampaignChannels = Nothing
CampaignChannels = Split(Trim(RSCampaignChannels))
End If
I have attatched the code that calls it.
<tr> <td>Comms Channels..</td> <td> <table> <% x = 0 Do Until objRSCommsChannels.EOF If x = 0 Then %> <tr> <% End If For i = Lbound(CampaignChannels) to Ubound(CampaignChannels) %> <td width="192" align="right" bgcolor="#EEF1F8" id="Td1"><strong><%=objRSCommsChannels.Fields("ChannelDesc")%> </strong></td> <td width="32" align="center" bgcolor="#EEF1F8" id="Td2"> <strong> <label> <input type="checkbox" name="commschannel" value="<%=objRSCommsChannels.Fields("ChannelId")%>"></label> </strong> </td> <% Next If x = 3 Then %> </tr> <% x = 0 Else x = x + 1 End If objRSCommsChannels.MoveNext Loop objRSCommsChannels.Close Set objRSCommsChannels = Nothing %> </tr>