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 2 2234
> 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(lennybac on)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
dbComm.Paramete rs.Add("@produc tunitprice",Sql DbType.float)
"Daniel Fisher(lennybac on)" <info@(removeth is)lennybacon.c om> wrote in
message news:ud******** ******@TK2MSFTN GP15.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(lennybac on) MCP ASP.NET C# Blog: http://www.lennybacon.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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_
difference between the two.
What I want to do is float (or position) a revision date at the
right margin of a line that also has some text left justified. I
tried earlier to do this and failed utterly in MSIE 4. But I was
using span not div, and...
|
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;
|
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);
|
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; hj-54-56; 1565.00; 0
8228880; 30-56-tw; 3295.50; 0
0022339; hs-sa-73; 2975,75; 0
.... etc
|
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();
order02=myarray.sort(function1);
but instead of 0.1 I use 0,1 (with comma) not work;
| |
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 positive
integers or a decimal point. For example:
Enter amount:
and was capturing the float varialbe as in:
scanf ("%f", &myVar)
|
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:
|
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 that the
above number fails validation?
if (!(isFloat(price) && parseFloat(price) 0)) {
alert("Price field cannot be empty or zero!");
return;
|
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 generation
is there any other purpose than this, if so why ...????
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |