(0x800A0415) Expected literal constant

Discussion in 'ASP General' started by unixnewsboy@gmail.com, Jan 14, 2006.

  1. Guest

    For the life of me I can't see what is going wrong here... Why am i
    getting the above error

    <%

    'DataBase
    const DSN_NAME = "ORADBA"
    const DSN_SERV = "localhost"
    const DSN_UID = "ORADBA"
    const DSN_PWD = "ORADBA"
    const MM_Prod_DSN = "dsn=" & DSN_NAME & ";server=" & DSN_SERV & ";uid="
    & DSN_UID & ";pwd=" & DSN_PWD & ";"


    %>


    Please note, MM_Prod_DSN is defined on a single line.
     
    , Jan 14, 2006
    #1
    1. Advertising

  2. McKirahan Guest

    <> wrote in message
    news:...
    > For the life of me I can't see what is going wrong here... Why am i
    > getting the above error
    >
    > <%
    >
    > 'DataBase
    > const DSN_NAME = "ORADBA"
    > const DSN_SERV = "localhost"
    > const DSN_UID = "ORADBA"
    > const DSN_PWD = "ORADBA"
    > const MM_Prod_DSN = "dsn=" & DSN_NAME & ";server=" & DSN_SERV & ";uid="
    > & DSN_UID & ";pwd=" & DSN_PWD & ";"
    >
    >
    > %>
    >
    >
    > Please note, MM_Prod_DSN is defined on a single line.
    >


    You cannot construct a constant! Try this instead:

    Dim MM_Prod_DSN
    MM_Prod_DSN = "dsn=" & DSN_NAME & ";server=" _
    & DSN_SERV & ";uid=" & DSN_UID & ";pwd=" & DSN_PWD & ";"
     
    McKirahan, Jan 14, 2006
    #2
    1. Advertising

  3. Guest

    ahh... I thought it was ok as long as i didn't try to change it
    afterwords.

    thank you
     
    , Jan 14, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    13
    Views:
    13,022
    Kai-Uwe Bux
    Jan 22, 2007
  2. TimC
    Replies:
    6
    Views:
    2,149
    CBFalconer
    Mar 7, 2009
  3. TimC
    Replies:
    2
    Views:
    4,543
    James Kanze
    Mar 7, 2009
  4. Anonieko Ramos

    What's wrong with rpc-literal? Why use doc-literal?

    Anonieko Ramos, Sep 27, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    407
    Anonieko Ramos
    Sep 27, 2004
  5. Shea Barton
    Replies:
    2
    Views:
    193
    Shea Barton
    Aug 17, 2010
Loading...

Share This Page