通过Visual Studio 2012将浮动数据输入我的SQL服务器会导致错误

时间:2021-07-12 07:32:31

I have a table in a MS SQL 2012 which was created in Visual Studio 2012 through SQL Server Data Tools and has some float fields.

我在MS SQL 2012中有一个表,它是在Visual Studio 2012中通过SQL Server数据工具创建的,并且有一些浮点字段。

Now, I want to populate it also in Visual Studio, but when I enter a float value it says: 通过Visual Studio 2012将浮动数据输入我的SQL服务器会导致错误

现在,我想在Visual Studio中填充它,但是当我输入一个浮点值时它会说:

At home I have Visual Studio 2010 with SQL Server 2008 and everything is working as expected.

在家里我有Visual Studio 2010和SQL Server 2008,一切都按预期工作。

1 个解决方案

#1


1  

There is no error here. This is the expected behavior for all Windows applications. String to number or date conversions use the user's regional settings.

这里没有错误。这是所有Windows应用程序的预期行为。数字或日期转换的字符串使用用户的区域设置。

You almost certainly have different regional settings on your work and home computer and you tried to enter a number using the wrong decimal separator, eg '.' instead of ',' or vice versa.

您几乎肯定在您的工作和家用计算机上有不同的区域设置,并且您尝试使用错误的小数分隔符输入数字,例如'。'而不是','或反之亦然。

#1


1  

There is no error here. This is the expected behavior for all Windows applications. String to number or date conversions use the user's regional settings.

这里没有错误。这是所有Windows应用程序的预期行为。数字或日期转换的字符串使用用户的区域设置。

You almost certainly have different regional settings on your work and home computer and you tried to enter a number using the wrong decimal separator, eg '.' instead of ',' or vice versa.

您几乎肯定在您的工作和家用计算机上有不同的区域设置,并且您尝试使用错误的小数分隔符输入数字,例如'。'而不是','或反之亦然。