Microsoft VBScript compilation (0x800A0408) Invalid character

Discussion in 'ASP General' started by aklsdjfh, May 11, 2005.

  1. aklsdjfh

    aklsdjfh Guest

    I'm no expert in asp and vbscript but not a total beginner. I've got some
    VBScript in an asp page which is generating a forumla for use in Lotus Notes
    replication.

    The line that it is objecting to is
    <% if user2 <> "" then response.write("| @IsMember(&quot;" & LCase(user2) &
    "&quot;;@LowerCase(@Name([CN];AssignedTo)))") end if %>

    i.e. if the string user2 is "Mike" I expect the HTML to be
    | @IsMember(&quot;mike&quot;;@LowerCase(@Name([CN];AssignedTo)))

    and the display in the browser to be
    | @IsMember("mike";@LowerCase(@Name([CN];AssignedTo)))

    The server responds
    Error Type:
    Microsoft VBScript compilation (0x800A0408)
    Invalid character
    /6500/notes_atform.asp, line 25, column 57
    if user2 <> "" then response.write("| @IsMember(&quot;" & LCase(user2) &
    "&quot;;@LowerCase(@Name([CN];AssignedTo)))") end if
    --------------------------------------------------------^

    i.e. it is the semicolon on the first &quot; that it doesn't like. Why not?
    It is part of a string in quotes?

    I thought getting rid of the &quot; by using ...IsMember(" & chr(34) &
    LCase(... instead, but I now get the same error but at the ampersand before
    the LCase().

    I guess I'm missing somethign obvious. Please help!
     
    aklsdjfh, May 11, 2005
    #1
    1. Advertisements

  2. aklsdjfh

    aklsdjfh Guest

    Don't know what was going on there but I retyped the line and it's ok now ?!
     
    aklsdjfh, May 11, 2005
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.