subscript out of range 
Author Message
 subscript out of range

"subscript out of range"

this msg is confuonding us. in one machine (IIS 3.0, SP3, NT4.0) it runs
perfectly well. but when copywebbed using interdev on another machine
(running same specs as first machine), we get the subscript out of range
error.

below is the error msg and the code. when we comment out the erring lines,
the webpages load just fine, albeit with the missing dates that are being
extracted from the code below.

additional background. the main asp code generates a word document out of a
word template.  data is extracted from SYBASE and merged into datafields
inside the word template.

the checking in the code below is necessary because some of the fields are
blank and some contain null characters, which annoy the ASP.

hope u can help us.

----------

Microsoft VBScript runtime error '800a0009'

Subscript out of range

/projects/incProcEventDate.txt, line 20

---------

contents of incProcEventDate.txt

<%
Function Processing_Date(actual_dt, projected_day,
projected_month_yr)

actual_dt = Trim(actual_dt)
projected_day = Trim(projected_day)
projected_month_yr = Trim(projected_month_yr)

If (NOT ISNULL(actual_dt)) AND (NOT actual_dt = "")
AND (NOT actual_dt = " ") AND (NOT actual_dt = "  ")
AND (NOT actual_dt = "   ") Then
arrDate = Split( actual_dt, "-", 3 )
Processing_Date = arrDate(0) & " " & arrDate(1) & " " & arrDate(2)

ElseIf (ISNULL(actual_dt)) AND (NOT
ISNULL(projected_day)) AND (NOT
ISNULL(projected_month_yr)) Then
arrDate = Split( projected_month_yr, "-", 3 )

If (NOT ISNULL(projected_day)) AND (NOT projected_day = "") AND (NOT
projected_day = " ") AND (NOT projected_day = "  ") AND (NOT projected_day =
" ") Then
Processing_Date = projected_day & " " & arrDate(1) & " " & arrDate(2)
'>>>>>>line 20
Else
Processing_Date = arrDate(0) & " " & arrDate(1) & " " & arrDate(2)
End If

Else
Processing_Date = " "

End If

End Function
%>



Mon, 19 Nov 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. array subscript out of range

2. Passing Arrays to Functions - Subscript Out of Range Problem

3. HELP! Subscript Out Of Range error referencing array

4. "subscript out of range" - Excel

5. Subscript Out Of Range Error

6. Array Subscript out of range:

7. Subscript out of range error

8. Subscript Out Of Range

9. Subscript out of range error

10. Subscript out of range error

11. Subscript out of range

12. AddShapeRecordDetected Error: Subscript out of range

 

 
Powered by phpBB® Forum Software