Storing Currency Symbols in Database

Discussion in 'ASP General' started by J P Singh, Jan 27, 2004.

  1. J P Singh

    J P Singh Guest

    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
     
    J P Singh, Jan 27, 2004
    #1
    1. Advertising

  2. 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:#...
    > 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
    >
    >
     
    Aaron Bertrand - MVP, Jan 27, 2004
    #2
    1. Advertising

  3. J P Singh

    J P Singh Guest

    Great thanks

    But the issue is the user types in the currency when selecting a trasaction.
    So if he can type &pound; 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" <> wrote in message
    news:...
    > Store the HTML entity (&pound;) 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:#...
    > > 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
    > >
    > >

    >
    >
     
    J P Singh, Jan 27, 2004
    #3
  4. > 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" <> wrote in message
    > news:...
    > > Store the HTML entity (&pound;) 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:#...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
     
    Aaron Bertrand - MVP, Jan 27, 2004
    #4
  5. > 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/
     
    Aaron Bertrand - MVP, Jan 27, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Blum

    Re: allow all currency symbols

    Peter Blum, Oct 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    471
    magister
    Nov 3, 2004
  2. lareds
    Replies:
    4
    Views:
    1,311
    Tor Iver Wilhelmsen
    Nov 18, 2003
  3. David C

    Currency Symbols

    David C, Oct 9, 2009, in forum: ASP .Net
    Replies:
    8
    Views:
    506
    Gregory A. Beamer
    Oct 12, 2009
  4. JPike

    Currency Symbols in tooltip

    JPike, Nov 11, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    126
    JPike
    Nov 15, 2004
  5. James Sturrock

    Displaying currency symbols in select

    James Sturrock, Aug 17, 2007, in forum: Ruby
    Replies:
    6
    Views:
    154
    James Sturrock
    Aug 20, 2007
Loading...

Share This Page