Hi,
I have a database with a memofield from which I get the entire string after searching the whole text using a keyword (single or complex), but I have a problem, depending on the character in the string, the asp script shows an error:
Quote:
|
Microsoft VBScript runtime error '800a0009' Subscript out of range: '[number: 2]'
|
Examples:
by eighteen fifteen, five thousand chronometers were in use on ships sailing the
world's oceans.
the twenty-six year old singer says her music attempts to reach out for an understanding of othe
people's experiences
The output string stop here with the above error message.
MY CODE:
Quote:
<%For n = 0 to 3%>
<% mystring = rs1("texts") %>
<% myword = strkeyword %>
<% myarray = Split(mystring, myword, 3, 1) %>
<%next%>
<TABLE border=0>
<TR>
</TR>
<TR>
<TD width=49% align=right><%Response.Write "<font size=1 face=verdana ><b>" & MyArray(0) & "</b></font>" %> </TD>
<TD width=1% bgcolor=yellow><%response.write "<font size=1 face=verdana ><b>" & MyWord & "</b></font>" %></TD>
<TD width=49%><%response.write "<font size=1 face=verdana ><b>" & Myarray(2) & "</b></font>" %> </TD>
<TD width=1%><%'response.write "<font size=1 face=verdana ><b>" & rs1("fileid") & "</b></font>" %> </TD>
</TR>
</TABLE>
|
How I fix the error or hidden the error message?
Thanks in advance for any thoughts.
Lebron