Logic for Boolean variables in ASP

Asked

Viewed 238 times

0

Good morning, I do maintenance on a huge system, we have two servers, a test and another production, I happen to have the following problem:

On the test server this condition does not return as true(True), but on the production server it returns.

if Variavel Then Response.Write "OK" end if 

But if I do so

if Variavel = True then Response.Write "OK" end if 

Then it returns true on both servers, if I just change, put True in all, would solve, but there are many variables in many places, and change everything would be impractical, I wonder if there is how to configure, within the file itself . Asp something that forces the return to True even if I do not specify in if.

  • It’s been a long time since I’ve dealt with classical Asp.. but maybe a server is in PT and another EN. An attempt would be to put on the global.asa: Session.LCID = 1046 which defines PT or so what defines EN

  • 1

    Hello, good morning, that’s right, put as an answer please, so you can accept it.

1 answer

1


It can happen that one server is in PT/BR and another in EN. One way would be to add Global.asa to the configuration, so that both are in the same format:

<script language="VBScript" runat="Server">
   Sub Session_OnStart()
      'formato padrão PT/BR
       Session.LCID = 1046
   End Sub

   Sub Session_OnEnd
   End Sub
</script>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.