ADO从Visual C ++ 2003转换为2010 [英] ADO converting from Visual C++ 2003 to 2010

查看:144
本文介绍了ADO从Visual C ++ 2003转换为2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将一个真正庞大的应用程序从VS 2003转换为VS 2010.其中一个部分是一个Windows服务,它汇集了http连接并与SQL Server进行数据库事务。 2003项目在Windows 2000 Server下运行,现在这个转换/更新的项目应该在Windows 2008 Server上运行。



我有一些经验来进行这种转换VS 2003或者在6到2008年或2010年,虽然他们并不总是直截了当,但我总能找到解决已知问题的方法。到目前为止,我没有遇到严重的转换问题,直到我在创建数据库连接的源文件上遇到编译错误。编译错误是:



1> c:\\\ccarcase_storage \fontes alterados_bsi_2012\fontes_ba\lixeira\servicoworkflow\release\msado15.tlh( 2374):错误C2059:语法错误:''< l_type_raw>''

1> c:\\\ccarcase_storage \fontes alterados_bsi_2012\fontes_ba\lixeira\servicoworkflow



我理解编译器在编译期间生成文件msado15.tlh。 tbl生成的文件给出了错误



VARIANT_BOOL ADOEOF;



我做了一些谷歌搜索,似乎这个错误是由于ADO库的加载类型而发生的。



I am converting a real huge application from VS 2003 to VS 2010. One of its parts is a Windows service that pools http connections and makes database transactions with SQL Server. The 2003 project was running under Windows 2000 Server and now this converted/updated project should run on Windows 2008 Server.

I have had some experiences with making this conversion VS 2003 or 6 to 2008 or 2010, while they were not always straight forward, I have always found a solution to known issues. I was not having serious problems with the conversion so far until I faced a compilation error on a source file that creates the connection to the database. The compilation error is:

1>c:\clearcase_storage\fontes alterados_bsi_2012\fontes_ba\lixeira\servicoworkflow\release\msado15.tlh(2374): error C2059: syntax error : ''<l_type_raw>''
1>c:\clearcase_storage\fontes alterados_bsi_2012\fontes_ba\lixeira\servicoworkflow

I understand that the compiler generates the file msado15.tlh during compilation. The tbl generated file that gives the error

VARIANT_BOOL ADOEOF;

I have made some googling and it seems this error occurs due to the type of loading of the ADO library.

#import <msado15.dll> no_namespace rename("EOF", "ADOEOF")







我找到的解决方案谷歌要求我们更换电话,例如,使用重命名宏。不过,它不起作用。我离ADO专家很远,事实上,我从未使用过Visual Studio的数据库,所以这可能是一个非常简单的问题,有这方面知识的人可以轻松解决。



更糟糕的是,我正在编译Vista上的新代码。



所以任何帮助,指向读取的内容都会很高赞赏。在此先感谢。



注意:

- 我没有使用托管C ++或MFC,只是普通的Windows库。

- 也许msado15.dll不适用于Visual Studio 2010,或者我应该升级并使用类似 msadox.dll



编辑:



找到解决方案,好吧,有另一个源代码调用msado15.dll,所以DLL被包含两次当必须生成tlb文件时出现了一些问题。所以,就是这样,对不起我的愚蠢......




The solutions I found at Google asked us to replace the calls, e.g. , using the rename macro. Still, it does not work. I am very far from an expert in ADO, in fact, I never worked with data bases on Visual Studio, so it might be a real simple question that someone with decent knowledge of this could solve easily.

To make things worse, I am compiling the new code on Vista.

So any help, pointers to what read, would be highly appreciated. Thanks in advance.

NOTES:
- I am not using managed C++ or MFC, just plain old Windows Libraries.
- Perhaps the msado15.dll does not work with Visual Studio 2010, or I should upgrade and use something like msadox.dll



Found the solution, well, there was another source code that made calls to the msado15.dll, so the DLL was being included twice and there was some problem when it had to generate the tlb file. So, that was it , sorry for the my dumbness...

推荐答案

所以它解决了最简单的方法: - )
so it is solved the easiest way :-)


这篇关于ADO从Visual C ++ 2003转换为2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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