I am attempting to use ODBC within a CIN using MS VC++ .NET 2003. After I set up the CIN and the environment, I tested a compile and it worked fine. However, after I included an ODBC header file, the program no longer compiles. The only change I made was including the two required headers for ODBC:
/* CIN source file */
#include "extcode.h"
#include "sql.h"
#include "sqlext.h"
/* typedefs removed for brevity of post */
MgErr CINRun(TD1 *ConnectionOptions, LStrHandle *Number, TD2Hdl *RecordSet)
{
return noErr;
}
_____
Compiling...
Connect.c
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\sqltypes.h(137) : error C2061: syntax error : identifier 'SQLHWND'
c:\Program Files\Micro
soft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\sqltypes.h(137) : error C2059: syntax error : ';'
_____
sqltypes.h
136: #if defined(WIN32) || defined(OS2)
137: typedef HWND SQLHWND;
The errors are in files I did not write/change. This is a fresh install of VC++. Is it not possible to use ODBC with a CIN? If it is, how do I fix this error. There are many more like this one, this is simply the first. The rest are very similar for similar lines.