473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

float: use of comma's versus dots: 12,2 or 12.2

I have a webform that inserts product data in an sql database.
The price field is of the type "float".
On my web form, if I insert for example 12,2 in the price field => OK
But if I insert 12.2 I get an error.

Now the problem is that if I use the decimal-key (=dot) on my numeric path,
it inserts a "." instead of a ","
So I have to use the comma from outside the numeric path.

I have several computers, and all do the same.
I'm from belgium and in belgium, we use a comma as separator.

The weird thing is that if I for example open MS Excel and insert a number
with decimal , than the decimal separtor is inserted as a comma ",".

Hope someone can help me.

THX
Nov 18 '05 #1
2 2219
> On my web form, if I insert for example 12,2 in the price field => OK
But if I insert 12.2 I get an error.


Do you use ADO.NET Parameters?
--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/

Nov 18 '05 #2
dbComm.Parameters.Add("@productunitprice",SqlDbTyp e.float)

"Daniel Fisher(lennybacon)" <info@(removethis)lennybacon.com> wrote in
message news:ud**************@TK2MSFTNGP15.phx.gbl...
On my web form, if I insert for example 12,2 in the price field => OK
But if I insert 12.2 I get an error.


Do you use ADO.NET Parameters?
--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Stan Brown | last post by:
I've been thinking about float-ing a span versus float-ing a div, and the same for absolute positioning. When what is floated or positioned is a short chunk of text, I don't see any _visual_...
4
by: Jim West | last post by:
Both int a; std::complex<float> b; std::complex<float> c = static_cast<float>(a)*b; and int a; std::complex<float> b;
5
by: Gustaf Liljegren | last post by:
Values altered when I convert from string to float and back again: using System; class FloatTest { static void Main(string args) { string var1 = "800856.22"; Console.WriteLine(var1);
7
by: Sick | last post by:
My application populates a ListBox from a .TXT file. In the textfile there are prices with both dots as well as comma's for decimal indication. Example: 1234990; xg-tr-45; 1700,50; 0 2662666;...
13
by: artev | last post by:
If sort this work: var myarray= new Array(10,16,35,"0.1",8,4,22,19,1,22,35,9,26,38,40); with code function function1(a,b) {return a - b} var order02=new Array();...
43
by: Xancatal | last post by:
Hey everybody. I need help on this one. I need to verify that a number entered by a user is not either a negative number (-100.00), or an alphabet (a, b, c, X, Y) as well as other number other than...
3
by: shapper | last post by:
Hello, I was reading an article and I can't figure something. I have: div.float { float: left; } And the HTML:
5
by: laredotornado | last post by:
Hi, I have a text field with the value "29..99" (notice the two dots instead of one) and it is considered a float according to the following logic. How would I rewrite the isFloat function so...
22
by: aarklon | last post by:
Hi all, why does C language permits an extra comma in initializer list ex:- int days = { 31,28.31,30,31,30, 31,31,30,31,30,31, } i have heard it is for the purpose of automatic code...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.