Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default spanglish?

    hi:

    ASP/VBScript/Access

    Server variables
    ----------------
    HTTP_ACCEPT_LANGUAGE: es
    SERVER_SOFTWARE: Microsoft-IIS/5.0

    Response.Write rs.BOF: Verdadero/Falso
    Response.Write rs.EOF: True/False

    can somebody explain me why BOF value is showed in Spanish and EOF in
    English?

    TIA,

    manuel
    Manuel Socarras Guest

  2. #2

    Default Re: spanglish?

    Neither statement as written will be parsed as neither is well formed so
    both statements may simply be reminder notes somebody wrote to themselves in
    the code.

    --
    <%= Clinton Gallagher
    METROmilwaukee "Regional Information Services"
    NET csgallagher AT metromilwaukee.com
    URL [url]http://clintongallagher.metromilwaukee.com/[/url]




    "Manuel Socarras" <msoc**no-spam**@airtel.net> wrote in message
    news:d0f7ql$gj5$1@forums.macromedia.com...
    > hi:
    >
    > ASP/VBScript/Access
    >
    > Server variables
    > ----------------
    > HTTP_ACCEPT_LANGUAGE: es
    > SERVER_SOFTWARE: Microsoft-IIS/5.0
    >
    > Response.Write rs.BOF: Verdadero/Falso
    > Response.Write rs.EOF: True/False
    >
    > can somebody explain me why BOF value is showed in Spanish and EOF in
    > English?
    >
    > TIA,
    >
    > manuel

    clintonG Guest

  3. #3

    Default Re: spanglish?

    sorry, i did write the code. i was showing results

    clintonG wrote:
    > Neither statement as written will be parsed as neither is well formed so
    > both statements may simply be reminder notes somebody wrote to themselves in
    > the code.
    >
    Manuel Socarras Guest

  4. #4

    Default Re: spanglish?

    You got me on that one. I would expect that the Response object took care
    of the language, so.....
    Can you post the code you used to get those results? If for no other reason
    than to see it with my own eyes. :)

    "Manuel Socarras" <msoc**no-spam**@airtel.net> wrote in message
    news:d0f7ql$gj5$1@forums.macromedia.com...
    > hi:
    >
    > ASP/VBScript/Access
    >
    > Server variables
    > ----------------
    > HTTP_ACCEPT_LANGUAGE: es
    > SERVER_SOFTWARE: Microsoft-IIS/5.0
    >
    > Response.Write rs.BOF: Verdadero/Falso
    > Response.Write rs.EOF: True/False
    >
    > can somebody explain me why BOF value is showed in Spanish and EOF in
    > English?
    >
    > TIA,
    >
    > manuel

    CMBergin Guest

  5. #5

    Default Re: spanglish?

    <%
    DBPath = Server.MapPath("../Data/compasstravel.mdb")

    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPath
    Set rs = conn.Execute("SELECT FIRSTNAME,LASTNAME,DEPARTMENT,SALARY,CP
    FROM EMPLOYEES WHERE SALARY < 1500")

    Response.Write "<B>HTTP_ACCEPT_LANGUAGE: </B>" &
    Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") & "<BR>"

    Response.Write "<B>SERVER_SOFTWARE: </B>" &
    Request.ServerVariables("SERVER_SOFTWARE") & "<BR>"

    Response.Write rs.BOF & "<BR>"
    Response.Write rs.EOF

    %>

    here is the code. You can test here:

    [url]http://projectes.esdi.es/msocarras/sql/test4.asp[/url]

    these what I receive (NN 7.2, OSX 10.3):

    HTTP_ACCEPT_LANGUAGE: en-us,en;q=0.5
    SERVER_SOFTWARE: Microsoft-IIS/5.0
    Verdadero
    True

    But I’ve discovered now that just adding a “<BR>” to the last Response,
    it shows OK:

    Response.Write rs.BOF & "<BR>"
    Response.Write rs.EOF & "<BR>"

    [url]http://projectes.esdi.es/msocarras/sql/test5.asp[/url]

    ????

    TIA,

    manuel



    CMBergin wrote:
    > You got me on that one. I would expect that the Response object took care
    > of the language, so.....
    > Can you post the code you used to get those results? If for no other reason
    > than to see it with my own eyes. :)
    >
    > "Manuel Socarras" <msoc**no-spam**@airtel.net> wrote in message
    > news:d0f7ql$gj5$1@forums.macromedia.com...
    >
    >>hi:
    >>
    >>ASP/VBScript/Access
    >>
    >>Server variables
    >>----------------
    >>HTTP_ACCEPT_LANGUAGE: es
    >>SERVER_SOFTWARE: Microsoft-IIS/5.0
    >>
    >>Response.Write rs.BOF: Verdadero/Falso
    >>Response.Write rs.EOF: True/False
    >>
    >>can somebody explain me why BOF value is showed in Spanish and EOF in
    >>English?
    >>
    >>TIA,
    >>
    >>manuel
    >
    >
    >
    Manuel Socarras Guest

  6. #6

    Default Re: spanglish?

    That sheds some light on the problem. Not that I know the answer. :)
    It seems as though the solitary true/false value is being translated to text
    by internal implicit conversion mechanisms built into the Response object.
    By concatenating another string, though, it's first run through the main
    VBScript engine to perform the concatenation, then only the final resulting
    string is output by the Response object.
    I would bet that simply concatenating an empty string to your boolean would
    take care of the translation. Try changing the last line to
    Response.Write rs.EOF & ""

    I bet it writes "verdadero".
    So - the lesson for the day is that the Response object itself does not
    translate boolean values based on regional settings when converted to text,
    but other parts of the VBScript engine do. Unless I'm completely wrong. ;)

    "Manuel Socarras" <msoc**no-spam**@airtel.net> wrote in message
    news:d0ilq9$nhv$1@forums.macromedia.com...
    > <%
    > DBPath = Server.MapPath("../Data/compasstravel.mdb")
    >
    > Set conn = Server.CreateObject("ADODB.Connection")
    > conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPath
    > Set rs = conn.Execute("SELECT FIRSTNAME,LASTNAME,DEPARTMENT,SALARY,CP
    > FROM EMPLOYEES WHERE SALARY < 1500")
    >
    > Response.Write "<B>HTTP_ACCEPT_LANGUAGE: </B>" &
    > Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") & "<BR>"
    >
    > Response.Write "<B>SERVER_SOFTWARE: </B>" &
    > Request.ServerVariables("SERVER_SOFTWARE") & "<BR>"
    >
    > Response.Write rs.BOF & "<BR>"
    > Response.Write rs.EOF
    > …
    > %>
    >
    > here is the code. You can test here:
    >
    > [url]http://projectes.esdi.es/msocarras/sql/test4.asp[/url]
    >
    > these what I receive (NN 7.2, OSX 10.3):
    >
    > HTTP_ACCEPT_LANGUAGE: en-us,en;q=0.5
    > SERVER_SOFTWARE: Microsoft-IIS/5.0
    > Verdadero
    > True
    >
    > But I’ve discovered now that just adding a “<BR>” to the last Response,
    > it shows OK:
    >
    > Response.Write rs.BOF & "<BR>"
    > Response.Write rs.EOF & "<BR>"
    >
    > [url]http://projectes.esdi.es/msocarras/sql/test5.asp[/url]
    >
    > ????
    >
    > TIA,
    >
    > manuel
    >
    >
    >
    > CMBergin wrote:
    > > You got me on that one. I would expect that the Response object took
    care
    > > of the language, so.....
    > > Can you post the code you used to get those results? If for no other
    reason
    > > than to see it with my own eyes. :)
    > >
    > > "Manuel Socarras" <msoc**no-spam**@airtel.net> wrote in message
    > > news:d0f7ql$gj5$1@forums.macromedia.com...
    > >
    > >>hi:
    > >>
    > >>ASP/VBScript/Access
    > >>
    > >>Server variables
    > >>----------------
    > >>HTTP_ACCEPT_LANGUAGE: es
    > >>SERVER_SOFTWARE: Microsoft-IIS/5.0
    > >>
    > >>Response.Write rs.BOF: Verdadero/Falso
    > >>Response.Write rs.EOF: True/False
    > >>
    > >>can somebody explain me why BOF value is showed in Spanish and EOF in
    > >>English?
    > >>
    > >>TIA,
    > >>
    > >>manuel
    > >
    > >
    > >

    CMBergin Guest

  7. #7

    Default Re: spanglish?

    you're right, any concatenation operation produces a right result. so,
    as you say, everyday we learn something new!

    thanks,

    manuel

    CMBergin wrote:
    > That sheds some light on the problem. Not that I know the answer. :)
    > It seems as though the solitary true/false value is being translated to text
    > by internal implicit conversion mechanisms built into the Response object.
    > By concatenating another string, though, it's first run through the main
    > VBScript engine to perform the concatenation, then only the final resulting
    > string is output by the Response object.
    > I would bet that simply concatenating an empty string to your boolean would
    > take care of the translation. Try changing the last line to
    > Response.Write rs.EOF & ""
    >
    > I bet it writes "verdadero".
    > So - the lesson for the day is that the Response object itself does not
    > translate boolean values based on regional settings when converted to text,
    > but other parts of the VBScript engine do. Unless I'm completely wrong. ;)
    Manuel Socarras 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