Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Storing Currency Symbols in Database (http://www.velocityreviews.com/forums/t792959-storing-currency-symbols-in-database.html)

J P Singh 01-27-2004 04:48 PM

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



Aaron Bertrand - MVP 01-27-2004 05:01 PM

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
>
>




J P Singh 01-27-2004 05:05 PM

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 &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" <aaron@TRASHaspfaq.com> wrote in message
news:uvETUdP5DHA.360@TK2MSFTNGP12.phx.gbl...
> 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:#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
> >
> >

>
>




Aaron Bertrand - MVP 01-27-2004 05:19 PM

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 (&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:#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
> > >
> > >

> >
> >

>
>




Aaron Bertrand - MVP 01-27-2004 05:20 PM

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:14 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.