This topic is locked

Changing currency

1/30/2004 3:18:28 AM
ASPRunnerPro General questions
E
elparaiso author

I have struggled with the currency settings for several days using every combination I can find including defalt. I can't get prices to show in euros even though my system is set up for this currency and works with other databases.

Sergey Kornilov admin 1/30/2004

Hi,
here is the only guaranteed way you can dsiplay Euro sign on ASP page:

Response.Write "€ " & FormatNumber((GetData(rsData.Fields("Price"), "")))


Replace Price with your field name.

E
elparaiso author 1/30/2004

You'll must bare with me - Thank you but where does the code go ? I am new to this and love the asprunner but my lack of knowledge is frustrating

Sergey Kornilov admin 1/30/2004

Hi,
open ..._list.asp file in text editor and find sub LoopRS. This Sub displays database content row by row. Find a snippet of code that displays your currency field (Price in this example):

<%

if IsBinaryField(rsData.Fields("Date Listed")) then

  Response.Write CreateImageControl(rsData, "Price")

else

  Response.Write ProcessLargeText(GetData(rsData.Fields("Price"), ""))

end if

%>



and make changes in bold:

<%

if IsBinaryField(rsData.Fields("Date Listed")) then

  Response.Write CreateImageControl(rsData, "Price")

else

  Response.Write "&euro;&nbsp;" & FormatNumber((GetData(rsData.Fields("Price"), "")))

end if

%>


I hope it helps.