PDA

Click to See Complete Forum and Search --> : Reading an Array in ASP


Bigley
Sep 12th, 2000, 07:23 AM
I am using a class to return a variant (2 dimensional array) to my ASP. The contents of this array are fieldnames and records. I want to read through this array in my ASP and for now just print the details on to the web page. However when I run the ASP it seems to be stuck in an endless loop. The class does work so it must be somewhere in my ASP ->

<html>

<head>
<title>Details</title>
</head>

<body font face="Tahoma" color="#1E5FA9">

<%

dim myDLL
dim myArray


set myDLL = Server.CreateObject("prjASP.clsBrCustomersPk")

myArray = myDLL.GetCustomerRecord(237999)
If myDLL(0) = "Not Found" Then
Response.Write("Sorry, but customer " & 237999 & " was not found.")
Else
For j = 0 To 2
For i = 0 To 30
Response.Write(myArray(j,i) )%>

<p><br>
<%
Next
Next
end if
%></p>
</body>
</html>

Thanks in advance

Mark Sreeves
Sep 14th, 2000, 07:39 AM
is anything being written out to the page at all?

if not,
is there anything (errors mesages) when you view-source?

Are you sure the syntax of
If myDLL(0) = "Not Found" Then
is correct?

I would have expected it to be myArray(0) or something like that

asabi
Sep 16th, 2000, 01:57 AM
try:

if not (isarray (myArray)) then
"sorry ..."
else
for ...

next
end if