Euro currency character causes problem
From: Philip Harris (pjh1_at_tesco.net)
Date: 08/24/04
- Next message: ado.net: "Re: visual basic.net standard 2003 (ado.net)"
- Previous message: Manas: "Unspecified error using ASP and MSAccess ( SOS )"
- Messages sorted by: [ date ] [ thread ]
Date: 24 Aug 2004 06:01:19 -0700
This is a bit of a mix of ADO and ASP - please bear with me.
Simply by having a euro character returned in a result set causes big
problems. First, the row that has such a character gets broken
(fields set to null or 0 or blank). Second the row that has the
character in _may_ display ok but subsequent rows might show the
symptoms instead!
I have narrowwd the first problem to the following piece of code
(you'll need to give it a real DSN(!!)) but cannot identify why the
'echo' of this row may affect subsequent rows. Fortunately, fixing
the data resolved my problem but is there a more generic solution to
this other than to just not return a euro character?
Here's the code...
<html>
<body>
<%
dim sDSN
Dim oRs, oCn
Set oRs = Server.CreateObject("ADODB.Recordset")
Set oCn = Server.CreateObject("ADODB.Connection")
oRs.CursorType = adOpenStatic
oCn.CursorLocation = adUseClient
sDSN="DSN=DEV;UID=;PWD="
oCn.Open sDSN
oRs.
Dim sQry
sQry = "select '€300'"
Response.Write sQry
Response.Flush
Set oRs = ExecuteSQL(oCn, sQry)
dim a
dim i
dim j
dim i_max
dim j_max
a = oRs.GetRows
i_max = ubound(a,1)
j_max = ubound(a,2)
Response.Write "<table>"
for j = 0 to j_max
Response.Write "<tr>"
for i = 0 to i_max
Response.Write "<td>" & a(i,j) & "</td>"
next
Response.Write "</tr>"
next
Response.Write "</table>"
%>
</body>
</html>
- Next message: ado.net: "Re: visual basic.net standard 2003 (ado.net)"
- Previous message: Manas: "Unspecified error using ASP and MSAccess ( SOS )"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|