global.asa

Discussion in 'ASP General' started by donald, Nov 24, 2003.

  1. donald

    donald Guest

    hi guys,
    i got a problem with my global.asa file.
    it was working fine with win2000. when i try to access the web pages with xp
    pro i get this error message -

    >Error Type:
    >Microsoft VBScript compilation (0x800A03F2)
    >Expected identifier
    >/dmk/liarsdice/global.asa, line 7, column 4
    >dim const whosturn=0
    >---^


    its obviously finding the global file ok, but i cant figure out what the
    identifier its expecting is. the line thats bringing up the error is the
    first in a series of constants declared in the sub application_onstart
    section of the global.asa file. is it something to do with xp? an i missing
    something really obvious(again :( )

    thanks
    donald
    donald, Nov 24, 2003
    #1
    1. Advertising

  2. donald

    Evertjan. Guest

    donald wrote on 24 nov 2003 in microsoft.public.inetserver.asp.general:

    >>dim const whosturn=0

    >


    Never heard of constants in VBscript.

    try:

    dim whosturn
    whosturn = 0


    Anyway the name "whosturn" seems to me a variable and not a constant value.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Nov 24, 2003
    #2
    1. Advertising

  3. donald

    Ray at Guest

    You don't dim a constant. You either dim a variable or just define a
    constant.

    Dim whosturn
    whosturn = 0
    'or
    Const WHOSTURN = 0

    This is the same whether this is W2K or not.

    Ray at work


    "donald" <> wrote in message
    news:bpt0gr$e29$...
    > hi guys,
    > i got a problem with my global.asa file.
    > it was working fine with win2000. when i try to access the web pages with

    xp
    > pro i get this error message -
    >
    > >Error Type:
    > >Microsoft VBScript compilation (0x800A03F2)
    > >Expected identifier
    > >/dmk/liarsdice/global.asa, line 7, column 4
    > >dim const whosturn=0
    > >---^

    >
    > its obviously finding the global file ok, but i cant figure out what the
    > identifier its expecting is. the line thats bringing up the error is the
    > first in a series of constants declared in the sub application_onstart
    > section of the global.asa file. is it something to do with xp? an i

    missing
    > something really obvious(again :( )
    >
    > thanks
    > donald
    >
    >
    Ray at, Nov 24, 2003
    #3
  4. donald

    Foo Man Chew Guest

    > Never heard of constants in VBscript.

    Sure, they're there.

    CONST foo = "bar"
    Foo Man Chew, Nov 24, 2003
    #4
  5. donald

    donald Guest

    this is driving me nuts. i can dim "some" variables in the asa file, but not
    others. and i cant put then in as "dim const x=whatever", only as "dim x"
    the same global.asa file was working fine under win2000. could id be
    anything to do with me installing php?

    > > Never heard of constants in VBscript.

    >
    > Sure, they're there.
    >
    > CONST foo = "bar"
    donald, Nov 24, 2003
    #5
  6. donald

    Ray at Guest

    See my reply that was posted 10 minutes after your question.

    Ray at work

    "donald" <> wrote in message
    news:bpu3l8$t42$...
    > this is driving me nuts. i can dim "some" variables in the asa file, but

    not
    > others. and i cant put then in as "dim const x=whatever", only as "dim x"
    > the same global.asa file was working fine under win2000. could id be
    > anything to do with me installing php?
    >
    > > > Never heard of constants in VBscript.

    > >
    > > Sure, they're there.
    > >
    > > CONST foo = "bar"

    >
    >
    Ray at, Nov 25, 2003
    #6
  7. donald

    donald Guest

    hi ray,
    what reply? i dont see it? was it in this thread?

    > See my reply that was posted 10 minutes after your question.
    >
    > Ray at work
    donald, Nov 25, 2003
    #7
  8. donald

    Ray at Guest

    Yes, it was in this thread. Here it is again.


    You don't dim a constant. You either dim a variable or just define a
    constant.

    Dim whosturn
    whosturn = 0
    'or
    Const WHOSTURN = 0

    This is the same whether this is W2K or not.

    Ray at work


    "donald" <> wrote in message
    news:bq07tk$kp5$...
    > hi ray,
    > what reply? i dont see it? was it in this thread?
    >
    > > See my reply that was posted 10 minutes after your question.
    > >
    > > Ray at work

    >
    >
    Ray at, Nov 25, 2003
    #8
  9. donald

    donald Guest

    cheers ray thats working :eek:)
    well, at least sort of, its bringing up an error with just one of my
    constants now (one called "call") but i figure thats probably cause its a
    restricted word or something like that. i'll make a few changes to the code,
    that'll sort it.
    it was definately working with "dim const x = whatever" on win2000 though. i
    tried it earlier today on another machine. no errors with the constant
    called "call" either. strange....


    > You don't dim a constant. You either dim a variable or just define a
    > constant.
    >
    > Dim whosturn
    > whosturn = 0
    > 'or
    > Const WHOSTURN = 0
    >
    > This is the same whether this is W2K or not.
    >
    > Ray at work
    >
    >
    > "donald" <> wrote in message
    > news:bq07tk$kp5$...
    > > hi ray,
    > > what reply? i dont see it? was it in this thread?
    > >
    > > > See my reply that was posted 10 minutes after your question.
    > > >
    > > > Ray at work

    > >
    > >

    >
    >
    donald, Nov 25, 2003
    #9
  10. donald

    Ray at Guest

    "donald" <> wrote in message
    news:bq0bmv$iao$...
    > cheers ray thats working :eek:)
    > well, at least sort of, its bringing up an error with just one of my
    > constants now (one called "call") but i figure thats probably cause its a
    > restricted word or something like that. i'll make a few changes to the

    code,
    > that'll sort it.


    Yes, exactly, call is a reserved word. Call SubRoutine...

    > it was definately working with "dim const x = whatever" on win2000 though.


    I'll believe that when I see it.

    > i
    > tried it earlier today on another machine. no errors with the constant
    > called "call" either. strange....


    I'll also believe that when I see it. :]


    Ray at work
    Ray at, Nov 25, 2003
    #10
    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. Darlene Gauthier

    PostRequestHandlerExecute event in global.asa

    Darlene Gauthier, Jul 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,412
    Karl Seguin
    Jul 23, 2003
  2. Kevin Spencer

    Re: global.asa file (count sessions)

    Kevin Spencer, Jul 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    347
    Kevin Spencer
    Jul 30, 2003
  3. DevBoy

    Global.asa File ?????

    DevBoy, Aug 12, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    345
    Rick Strahl [MVP]
    Aug 13, 2003
  4. Wayne
    Replies:
    2
    Views:
    456
    Wayne
    Nov 11, 2003
  5. Raghu
    Replies:
    1
    Views:
    4,014
    Raghu
    Feb 17, 2005
Loading...

Share This Page