using eval to update recordset

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default using eval to update recordset

    <%
    Response.write(RS("txt_policyFee") & "<BR>")
    eval(RS("mem_PolicyCode"))
    Response.write(RS("mem_policyCode") & "<BR>")
    RS.UpdateBatch
    Response.write(RS("txt_policyFee") & "<BR>")
    %>

    Gives this output:

    0
    RS("txt_policyFee") = 35
    0

    What am I missing? is there a way to do this?
    for clarification: My problem is that the second policy fee is 0 and not 35
    Mark Greenway Guest

  2. Similar Questions and Discussions

    1. #5435 [Opn->Bgs]: Request to update eval() or create new function.
      ID: 5435 Updated by: bjori@php.net Reported By: dahamsta at iewebs dot com -Status: Open +Status: Bogus Bug Type: ...
    2. Recordset Update Problems
      This subroutine is for an error logger, and I'm trying to check if a similar error already exists, only update a few things (time, number of...
    3. Help with eval()
      I have this line in my code: eval('$field->' . $val . '(' . $max . ',' . $errDisplayArray . ');'); where $field is a predefined class...
    4. RecordSet.Move or RecordSet.AbsolutePosition??
      Hi, I'm trying to use either one of these methods to position the cursor in a specific position inside a recordset, but neither one seems to...
    5. #5435 [Com]: Request to update eval() or create new function.
      ID: 5435 Comment by: a at b dot c dot de Reported By: dahamsta at iewebs dot com Status: Open Bug Type: Feature/Change Request...
  3. #2

    Default Re: using eval to update recordset

    Why are you using eval?

    Ray at work

    "Mark Greenway" <NetAdmin@liginsurance.com> wrote in message
    news:5ce5f8d1.0308081313.5db09eea@posting.google.c om...
    > <%
    > Response.write(RS("txt_policyFee") & "<BR>")
    > eval(RS("mem_PolicyCode"))
    > Response.write(RS("mem_policyCode") & "<BR>")
    > RS.UpdateBatch
    > Response.write(RS("txt_policyFee") & "<BR>")
    > %>
    >
    > Gives this output:
    >
    > 0
    > RS("txt_policyFee") = 35
    > 0
    >
    > What am I missing? is there a way to do this?
    > for clarification: My problem is that the second policy fee is 0 and not
    35


    Ray at Guest

  4. #3

    Default Re: using eval to update recordset

    Because he wants to execute code contained in the recordset field.

    Ray at <%=sLocation%> wrote:
    > Why are you using eval?
    >
    > Ray at work
    >
    > "Mark Greenway" <NetAdmin@liginsurance.com> wrote in message
    > news:5ce5f8d1.0308081313.5db09eea@posting.google.c om...
    >> <%
    >> Response.write(RS("txt_policyFee") & "<BR>")
    >> eval(RS("mem_PolicyCode"))
    >> Response.write(RS("mem_policyCode") & "<BR>")
    >> RS.UpdateBatch
    >> Response.write(RS("txt_policyFee") & "<BR>")
    >> %>
    >>
    >> Gives this output:
    >>
    >> 0
    >> RS("txt_policyFee") = 35
    >> 0
    >>
    >> What am I missing? is there a way to do this?
    >> for clarification: My problem is that the second policy fee is 0 and
    >> not 35

    Bob Barrows Guest

  5. #4

    Default Re: using eval to update recordset

    I see. Interesting.

    Ray at work

    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:ekY4gOfXDHA.1832@TK2MSFTNGP09.phx.gbl...
    > Because he wants to execute code contained in the recordset field.
    >
    > Ray at <%=sLocation%> wrote:
    > > Why are you using eval?
    > >
    > > Ray at work
    > >
    > > "Mark Greenway" <NetAdmin@liginsurance.com> wrote in message
    > > news:5ce5f8d1.0308081313.5db09eea@posting.google.c om...
    > >> <%
    > >> Response.write(RS("txt_policyFee") & "<BR>")
    > >> eval(RS("mem_PolicyCode"))
    > >> Response.write(RS("mem_policyCode") & "<BR>")
    > >> RS.UpdateBatch
    > >> Response.write(RS("txt_policyFee") & "<BR>")
    > >> %>
    > >>
    > >> Gives this output:
    > >>
    > >> 0
    > >> RS("txt_policyFee") = 35
    > >> 0
    > >>
    > >> What am I missing? is there a way to do this?
    > >> for clarification: My problem is that the second policy fee is 0 and
    > >> not 35
    >
    >

    Ray at Guest

  6. #5

    Default Re: using eval to update recordset

    "Mark Greenway" <NetAdmin@liginsurance.com> wrote in message
    news:5ce5f8d1.0308081313.5db09eea@posting.google.c om...
    > <%
    > Response.write(RS("txt_policyFee") & "<BR>")
    > eval(RS("mem_PolicyCode"))
    > Response.write(RS("mem_policyCode") & "<BR>")
    > RS.UpdateBatch
    > Response.write(RS("txt_policyFee") & "<BR>")
    > %>
    >
    > Gives this output:
    >
    > 0
    > RS("txt_policyFee") = 35
    > 0
    >
    > What am I missing? is there a way to do this?
    > for clarification: My problem is that the second policy fee is 0 and not
    35

    You want execute, not eval


    Chris Hohmann 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