最佳实践文件上传到数据库文件上传、数据库

由网友(转身离去)分享简介:我要寻找的是如何创建一个接口,从.NET Web应用程序数据库上传的Excel文件数据的最佳做法或想法我应该使用一种机制,允许所有的记录被加载并标记错误,或者我应该用当错误发生时停止负载的机制。I am looking for any best practices or ideas on how you would...

我要寻找的是如何创建一个接口,从.NET Web应用程序数据库上传的Excel文件数据的最佳做法或想法 我应该使用一种机制,允许所有的记录被加载并标记错误,或者我应该用当错误发生时停止负载的机制。

I am looking for any best practices or ideas on how you would create an interface with a DB from a .NET web application to upload data from Excel files Should I use a mechanism that allows all the records to be loaded and flags the errors or should I use a mechanism that stops the load when an error occurs.

我从未有过这样的帮助将是超级对付这种类型的需求!

I've never had to deal with this type of requirement before so any help would be super!

感谢

推荐答案

如果在你的数据库数据的完整性是非常重要的,不允许的数据要导入有错误或不符合您的数据库的验证要求。

If data integrity in your DB is important, do not allow data to be imported that has errors or does not meet the validation requirements of your DB.

由于这些是Excel文件,应该是,而不是试图使用另一个接口来修正数据容易足以使用户校正在Excel文件中的数据,。只要确保该错误信息将用户引导到什么领域的问题,并清楚地解释什么是错的。

Since these are Excel files, it should be easy enough for the user to correct the data in the Excel file, instead of trying to use another interface to fix the data. Just make sure the error messages direct the user to what field is the problem and clearly explain what is wrong.

阅读全文

相关推荐

最新文章