subscript out of range error

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default subscript out of range error

    I am getting the following error: Subscript out of range: 'x' which occurs on
    the following line: cmd_AlloUpdate.Parameters.Item('@ddo').Value = ddolist(x)
    I'm using the split function: ddolist = Split(Request.Form('ddomenuA'),', ') I
    pass in the parameter like so: Dim cmd_AlloUpdate__ddo cmd_AlloUpdate__ddo = ''
    if(Request('ddomenuA') <> '') then cmd_AlloUpdate__ddo = Request('ddomenuA')
    I'm pretty sure the problem is due to a change I made in the dynamic selection
    list, which can now pass in one of two possible parameters: <% if
    rsHdr.Fields.Item('ABR_STATUS').Value = 'INREVIEW' XOR
    rsHdr.Fields.Item('ABR_STATUS').Value = 'WITHDRAW' Then %> <input
    name='ddomenuA<%=(rsAllocation.Fields.Item('ABR_DE TLS_ID').Value)%>'
    class='ddoinput'
    id='ddomenuA<%=(rsAllocation.Fields.Item('ABR_DETL S_ID').Value)%>'
    value='<%=(rsAllocation.Fields.Item('ABR_DETLS_DDO ').Value)%>' readonly='true'>
    <% else %> <select
    name='ddomenuA<%=(rsAllocation.Fields.Item('ABR_DE TLS_ID').Value)%>'
    class='ddoinput'
    id='ddomenuA<%=(rsAllocation.Fields.Item('ABR_DETL S_ID').Value)%>'> <% Do While
    NOT rsDDOMenu.EOF Response.Write('<option value=''' &amp;
    rsDDOMenu.Fields.Item('strddomenu').Value &amp; '''') If
    rsAllocation.Fields.Item('ABR_DETLS_DDO').Value =
    rsDDOMenu.Fields.Item('strddomenu').Value Then Response.Write('selected') End
    If Response.Write ('>' &amp; rsDDOMenu.Fields.Item('strddomenu').Value &amp;
    '</option>') rsDDOMenu.MoveNext() Loop rsDDOMenu.Requery %> </select> <% end if
    %> I'm lost on how to resolve this? I can provide more code if needed. I
    was just trying to isolate the problem and keep the code to a minimum. Can
    anyone help. Thanks, -D-

    -D- Guest

  2. Similar Questions and Discussions

    1. out of range error
      I don't understand why this always happens, what am I doing wrong? I have a grid: <asp:datagrid id=dg runat="server" AutoGenerateColumns="False">...
    2. ESC key generating #range error
      I've a projector which copies files using buddyApi to the user's hard drive. In the .ini file I've set escape = 0 so the user can't press Esc to...
    3. #24909 [Fbk->Opn]: rand function with range always returns low value of range
      ID: 24909 User updated by: a0 at hush dot com Reported By: a0 at hush dot com -Status: Feedback +Status: ...
    4. #24909 [Opn->Fbk]: rand function with range always returns low value of range
      ID: 24909 Updated by: iliaa@php.net Reported By: a0 at hush dot com -Status: Open +Status: Feedback...
    5. #24909 [NEW]: rand function with range always returns low value of range
      From: a0 at hush dot com Operating system: solaris 8 PHP version: 4.3.2 PHP Bug Type: Math related Bug description: rand...
  3. #2

    Default Re: subscript out of range error

    I think I found the problem...ddomenuA isn't valid now because I appended a
    recordset value to the end of it. So, I need to attach the value of the
    recordset field to ddomenuA. Not sure how to do this? -D-

    -D- Guest

  4. #3

    Default Re: subscript out of range error

    I capture the value for each record ID with the form field: detlsidA detlsidA
    can hold a comma delimited list...i.e.: 46, 45, 100, 200, etc. I need to
    append the values for detlsidA to each form field in the following statement:
    Dim cmd_AlloUpdate__ddo cmd_AlloUpdate__ddo = '' if(Request('ddomenuA') <> '')
    then cmd_AlloUpdate__ddo = Request('ddomenuA') How can I do this? Any help is
    greatly appreciated. Thanks. -D-

    -D- 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