Storing Currency Symbols in Database

J

J P Singh

Hi Guys

I am trying to store the currency symbol used for a trasaction in a database
field but rather than store £ it stores £ (see the wierd character at the
beginning of the symbol) instead.

The strange thing in even after storing this when I display the currency on
one page it shoes it as £ but on two of the pages it still shows £

I have looked at the database the value stored is £ where as the user is
only entering £

Does anyone know why this is happening? Any answers?

Thanks

Jas
 
A

Aaron Bertrand - MVP

Store the HTML entity (£) in a separate column, then you can just
concatenate during display (and continue to use a *NUMERIC* column for the
actual currency amount).
 
J

J P Singh

Great thanks

But the issue is the user types in the currency when selecting a trasaction.
So if he can type £ that would be great but they won't. One way of
limiting this would be to use a dropdown control but then I have manager a
list of currencies which I don't want to do. Any other suggestions?

Also why does it display properly on all the other pages but on one specific
page.
 
A

Aaron Bertrand - MVP

But the issue is the user types in the currency when selecting a
trasaction.

Right, but they don't type it right into the database, you can format their
input between form submission and sending it to the database, no?
 
A

Aaron Bertrand - MVP

But the issue is the user types in the currency when selecting a
trasaction.

Right, but they don't type it right into the database, you can format their
input between form submission and sending it to the database, no?
Also why does it display properly on all the other pages but on one specific
page.

Don't know, maybe session.LCID? You'll have to show us a page that works
and a page that doesn't.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top