Click here to Skip to main content
15,844,009 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
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.

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



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

Edit:

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...
Posted
Updated 24-May-13 7:29am
v2

1 solution

so it is solved the easiest way :-)
 
Share this answer
 
Comments
zlogdan 31-May-13 8:49am    
Yeah, but be aware that Visual Studio 2003 C++ compiler accepts the double inclusion. It was a bug in the original project, and I only could solve it because the second source code that imported the DLL is no longer used...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900