D
DaveS
Hi! I am returning a byte array from a function and wish to print out
the values of the array. However, I get
Microsoft VBScript runtime error '800a000d'
Type mismatch
Here is the gist of the code:
<%
Dim obj
Dim myBArray ' Array of Byte
Dim i
Set obj = Server.CreateObject("My.Function")
' Returns an array of byte
myBArray = obj.CreateByteArray("ABCDEF")
If IsArray(myBArray) Then
Response.Write "LBound(myBArray): " & LBound(myBArray)
Response.Write "<br>"
Response.Write "UBound(myBArray): " & UBound(myBArray)
Response.Write "-----------------<br>"
For i = LBound(myBArray) To UBound(myBArray)
Response.Write myBArray(i)
Next
Else
Response.Write "myBArray is not an array"
End If
Set obj = Nothing
%>
myBArray is an Array, and returns valid Lower and Upper Bounds, however
the code blows up on the Response.Write myBArray(i). Any ideas how to
fix this?
TIA,
DaveS
the values of the array. However, I get
Microsoft VBScript runtime error '800a000d'
Type mismatch
Here is the gist of the code:
<%
Dim obj
Dim myBArray ' Array of Byte
Dim i
Set obj = Server.CreateObject("My.Function")
' Returns an array of byte
myBArray = obj.CreateByteArray("ABCDEF")
If IsArray(myBArray) Then
Response.Write "LBound(myBArray): " & LBound(myBArray)
Response.Write "<br>"
Response.Write "UBound(myBArray): " & UBound(myBArray)
Response.Write "-----------------<br>"
For i = LBound(myBArray) To UBound(myBArray)
Response.Write myBArray(i)
Next
Else
Response.Write "myBArray is not an array"
End If
Set obj = Nothing
%>
myBArray is an Array, and returns valid Lower and Upper Bounds, however
the code blows up on the Response.Write myBArray(i). Any ideas how to
fix this?
TIA,
DaveS