为什么这个数据库更新只在一台客户端电脑上无效,而在其他几台电脑上运行良好



我有一个桌面项目,使用以下代码将数据保存到SQL Server数据库中:

this.Validate();
this.PropostasCabBindingSource.EndEdit();
this.PropostasLinhasBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(DBEmpresa);

它在除一个客户端外的几个客户端上都运行良好。在该客户端上,它没有异常,但不会对数据库表(PropostasCab(进行任何更改。那个客户也一样。NET(v4.6.2(,与网络上的其他客户端具有相同的SQL Server版本(v12.0.2569(,SQL Server 2005向后兼容性。

我尝试重新启动我提到的服务,重新安装SQLServer2005向后兼容性,但什么都没有。

有什么想法吗?是否存在SQL Server冲突?

我发现了问题。

该电脑的区域格式为"us us",而不是"pt pt"。因此,由于一些货币被格式化为"美国-美国",数据库正在回滚

现在我更改了CultureInfo:

CultureInfo culture = CultureInfo.CreateSpecificCulture("pt-PT");
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;

并且运行良好。

谢谢。

相关内容

最新更新