Results 1 to 3 of 3

Thread: Reading an Array in ASP

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    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

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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
    Mark
    -------------------

  3. #3
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    try:

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

    next
    end if
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width