使用C#比较两个.mdb文件是否相等 [英] Compare two .mdb files for equality using C#

查看:105
本文介绍了使用C#比较两个.mdb文件是否相等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在重构一个基于VB6的应用程序,比较两个Micorosft Access(.mdb)文件是否与C#相同。在旧的vb6代码中,在读取每个文件后开发了一个十六进制密钥,我相信十六进制密钥之间的比较。 vb代码将使用ADO和RecordSet等成员遍历每个数据库。



我试过寻找使用ADO.net和C#的例子没有成功。此外,如果必须使用新的十六进制值,则用于生成它的算法必须符合FIPS 140-2标准。这个应用程序不会通过互联网读取数据库所以我认为SHA-1 ... 256会做或MD5。我被告知实体框架是一个很好的可能性,但我没有看到好的编码示例来确认这是一个好主意。



有没有人有任何建议编写示例,了解如何使用C#迭代通过.mdb文件,并在迭代完成后开发十六进制代码。或者使用其他东西是否有更好的解决方案。请记住,由于我的要求,第三方应用程序不适合我。非常感谢任何帮助。

Hi,

I'm refactoring a VB6 based application that compared if two Micorosft Access (.mdb) files were the same into C#. In the old vb6 code, a hex key was developed after reading each file and I believe the comparison between the hex keys. The vb code would iterate through each database using ADO and members such as RecordSet.

I've tried looking for examples of using ADO.net with C# with no success. Also if a new hex value must be used, the alogorithm for generating it must be FIPS 140-2 compliant. This application will not be reading the databases through the internet so I think SHA-1...256 would do or MD5. I've been told the Entity framework was a good possibility but I have not seen good coding examples to confirm if this is a good idea.

Does anyone have any suggestions with coding examples for how to iterate thru a .mdb file using C# plus developing a hex code once the iteration is done. Or is there a better solution using something else. Keep in mind that third party applications are not an option for me due to requirements that I've been given. Any help would greatly be appreciated.

推荐答案

找到大量的ADO.NET示例: https://www.google.com/search?q=ADO.net+with+C%23 [ ^ ]。
Lots of ADO.NET samples to be found: https://www.google.com/search?q=ADO.net+with+C%23[^].


我建议你阅读:数据库比较中的基本任务 [ ^ ]和:如何:比较数据库模式 [ ^ ]
I'd suggest to read this: Basic tasks in Database Compare[^] and this: How to: Compare Database Schemas[^]


这篇关于使用C#比较两个.mdb文件是否相等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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