在其他系统上运行.exe之后 [英] after running .exe on other systems

查看:89
本文介绍了在其他系统上运行.exe之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的论坛成员,

我已经在C#点网络中使用Windows应用程序开发了一个软件,现在我从项目的bin文件夹中获取exe,并且在另一个系统上运行该exe,另一个系统我安装了sql server crystal报告,但问题出在是我跑步的时候 在已开发系统上的exe正常运行,并且当我尝试在其他系统上运行该exe时,会生成错误System.Data.SqlClient.SqlException(0x80131904):从字符串转换日期和/或时间时转换失败.和应用 正在退出,并且另一个问题是表中的数据更新也给出了相同的错误,如果我在已开发的系统上运行相同的exe时工作正常,并且在Crystal Report中显示了数据,请任何人可以帮助我,它非常紧急.帮助 我论坛成员...

i have developed a software using windows application in C# dot net now i am taking the exe from a bin folder of project and i am running that exe on the other system, the other system i installed sql server crystal report but the problem is when i am running the exe on developed system it is working properly and when i am trying run it on other system the error is generating System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting date and/or time from character string. and appliation is exiting , and another problem is the Updation of  data in the table is also giving same error , if i am running same exe on developed system is working properly and showing data in crystal report please any one can help me its very urgent please help me forum members......

预先感谢

关注苏尼尔·萨朗吉

推荐答案

嗨苏尼尔,

当与标准日期时间函数一起使用时,这似乎更像是系统区域设置用法不正确的问题. (应用程序期望DD-MM-YYYY且系统日期格式设置为MM-DD-YYYY或其他).

This seems more like an issue with the incorrect usage of System Locale, when used with the standard Date-Time functions. (Application expecting DD-MM-YYYY and system date format set to MM-DD-YYYY or something else).

如果您确定所有用户在Windows计算机上都将使用相同的日期时间格式,则可以在日期时间格式转换"中坚持使用单一日期时间格式.但是,如果不能保证,则应尝试设置日期时间 考虑到用户可以使用的各种日期时间格式,转换逻辑更加健壮.

If you are sure that all your users will be using the same Date-Time Format on their Windows Machine, you can stick to a single date time format in your Date Time Format Conversion. However, if this can not be guaranteed, you should try to make your date-time conversion logic more robust, to take into account of various Date Time formats the user can have.

希望这会有所帮助!

此致

Chirag Dave

Chirag Dave


这篇关于在其他系统上运行.exe之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆