![]() |
Storing Currency Symbols in Database
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 |
Re: Storing Currency Symbols in Database
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). -- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/ "J P Singh" <noemail@asIhatespam> wrote in message news:#bAoVVP5DHA.632@TK2MSFTNGP12.phx.gbl... > 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 > > |
Re: Storing Currency Symbols in Database
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. "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message news:uvETUdP5DHA.360@TK2MSFTNGP12.phx.gbl... > 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). > > -- > Aaron Bertrand > SQL Server MVP > http://www.aspfaq.com/ > > > > > "J P Singh" <noemail@asIhatespam> wrote in message > news:#bAoVVP5DHA.632@TK2MSFTNGP12.phx.gbl... > > 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 > > > > > > |
Re: Storing Currency Symbols in Database
> 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. -- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/ > > > "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message > news:uvETUdP5DHA.360@TK2MSFTNGP12.phx.gbl... > > 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). > > > > -- > > Aaron Bertrand > > SQL Server MVP > > http://www.aspfaq.com/ > > > > > > > > > > "J P Singh" <noemail@asIhatespam> wrote in message > > news:#bAoVVP5DHA.632@TK2MSFTNGP12.phx.gbl... > > > 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 > > > > > > > > > > > > |
Re: Storing Currency Symbols in Database
> 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. -- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/ |
| All times are GMT. The time now is 11:56 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.