Dumping an entire array to the screen

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Re: Dumping an entire array to the screen



    for iCounter = 0 to ubound(TheArray)
    response.write TheArray(iCounter) & "<br />"
    next

    Ray at work


    "Jacob" <yak2016@comcast.net> wrote in message
    news:e$Qx4UKRDHA.2344@TK2MSFTNGP12.phx.gbl...
    > Is there a way I can dump all the contents of an array to the browser for
    > viewing. I'm using rs.GetRows to create the array, but my functions are
    > only processing the first three records in what should be a 9 record set.
    > So I'd like to dump the array to find out if it is a bad select statement
    or
    > bad processing of the array itself by my functions.
    >
    > Thanks, Jacob
    >
    >

    Ray at Guest

  2. Similar Questions and Discussions

    1. dumping the schema ?
      hi, how can I dump the db schema so that I can recrate the DB later ? tia ---------------------------(end of...
    2. dumping database
      sorry in addition to my last question, does anyone know if it's possible for a web service/site to "dump" out a snapshot of a subset of a...
    3. column dumping
      Hi, is there a smart command line ( Unix ) utility to dump out a particular column to the STDOUT/file from a file containing multi column data ?...
    4. can list() in while loop, while printing things to a screen, somehow affect the values in an array?
      lawrence wrote: <snip> I'm not going to spend all my time analyzing this, as you obviously have multiple other functions and objects not...
    5. Passing an entire array in PHP
      Hi, I saw a previous post about sending arrays but did not quite understand the answers. The problem is that I would like to pass an entire...
  3. #2

    Default Re: Dumping an entire array to the screen

    "Jacob" wrote:
    >
    > Is there a way I can dump all the contents of an array to the browser for
    > viewing. I'm using rs.GetRows to create the array, but my functions are
    > only processing the first three records in what should be a 9 record set.
    > So I'd like to dump the array to find out if it is a bad select statement
    or
    > bad processing of the array itself by my functions.
    assuming { a = rs.GetRows() }...

    JScript:
    Response.Write(a.join("<BR>"))

    VBScript:
    Response.Write Join(a,"<BR>")


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.


    Dave Anderson Guest

  4. #3

    Default Re: Dumping an entire array to the screen

    That was pretty clever.

    Ray at work

    "Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message
    news:%23M4mViKRDHA.2320@TK2MSFTNGP12.phx.gbl...
    > "Jacob" wrote:
    > >
    > > Is there a way I can dump all the contents of an array to the browser
    for
    > > viewing. I'm using rs.GetRows to create the array, but my functions are
    > > only processing the first three records in what should be a 9 record
    set.
    > > So I'd like to dump the array to find out if it is a bad select
    statement
    > or
    > > bad processing of the array itself by my functions.
    >
    > assuming { a = rs.GetRows() }...
    >
    > JScript:
    > Response.Write(a.join("<BR>"))
    >
    > VBScript:
    > Response.Write Join(a,"<BR>")
    >
    >
    > --
    > Dave Anderson
    >
    > Unsolicited commercial email will be read at a cost of $500 per message.
    Use
    > of this email address implies consent to these terms. Please do not
    contact
    > me directly or ask me to contact you directly for assistance. If your
    > question is worth asking, it's worth posting.
    >
    >

    Ray at Guest

  5. #4

    Default Re: Dumping an entire array to the screen

    I wrote:
    >
    > JScript:
    > Response.Write(a.join("<BR>"))
    [Correction]
    Since GetRows returns a SafeArray, JScript needs a little bit of tweaking.
    This will simply dump the array with a line break between elements:

    Response.Write(new VBArray(rs.GetRows()).toArray().join("<BR>"))

    Unfortunately, the 2D nature of the array is lost, so if you want a line per
    record, use rs.GetString():

    Response.Write(RS.GetString(2,100,",","<BR>","null "))

    Come to think of it, that's a better way for VBScript as well.


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.


    Dave Anderson Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139