我如何将MS Access数据库应用程序替换为Sql Server应用程序

问题描述:

我有一个带有ms访问数据库的窗口应用程序,该应用程序也可以方便地进行各种报告.
现在我要使用SQL Server数据库.如何转换与SQL Server兼容的应用程序.

我尝试在整个项目中用Sql替换OleDb,然后用sql server连接字符串替换conncetion字符串.
但发生了很多错误.
大多数与表适配器和数据集有关

请给我建议一些解决方案.

谢谢!

I have an window application with ms access database that facilitates various reports also.
Now i want to use SQL Server database.How can i convert my Application Compitable with sql server.

I tried by replacing OleDb by Sql in whole project and replaced conncetion string with sql server connection string.
but so much errors occured.
mostly are related to Table Adaptors and DataSets

Please suggest me some solution.

Thanks!

有趣的是,您从数据集中得到了错误.这些不是数据库特定的对象.

SqlClient类非常接近等效的OleDb类(通常Sql类具有更多功能).

如果您使用搜索和替换进行了转换",则可能是您替换的内容过多(名称中的文字等).

无论如何,我认为最好从头开始,仅使用Find查找OleDb类,然后手动检查每次出现的情况,应如何对其进行修改.当您开始执行此操作时,我认为您很快就会为每个类找到一个不错的搜索/替换模式.然后,您可以在每个课程之前进行替换.
It''s funny that you get errors from datasets. These are not database specific objects.

SqlClient classes are very close to equivalent OleDb classes (typically Sql classes have more functionality).

If you did the ''conversion'' with search and replace, it could be that you have been replacing too much (text in the names etc).

Anyhow, I think that it''s best to start from the beginning and just use Find to find the OleDb classes and then manually check each occurrence, how they should be modified. When you start doing this I think you quite quickly find a good search/replace pattern for each class. Then you can do the replacement pre each class.