Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Manuel Socarras #1
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
-
clintonG #2
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
-
Manuel Socarras #3
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
-
CMBergin #4
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
-
Manuel Socarras #5
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
-
CMBergin #6
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...care> <%
> 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 tookreason> > of the language, so.....
> > Can you post the code you used to get those results? If for no other> > 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
-
Manuel Socarras #7
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



Reply With Quote

