I'm currently porting my application from Linux to Windows 2000. The
application uses ODBC to access SAPDB. I have written a C++ class that
encapsulates the ODBC calls.
Under Linux everything works fine. But now, on windows I get strange compiler
errors from Visual C++ 6.0. When I call SQLDriverConnect with this call
rc = SQLDriverConnect (mHdbc, (HWND)NULL, (SQLCHAR*)connectString.ascii(),
SQL_NTS, (SQLCHAR*)outString, sizeof(outString),
&outLen,
SQL_DRIVER_NOPROMPT);
I get the following error message:
.\dbconnection.cpp(76) : error C2664: 'SQLDriverConnectW' : Konvertierung des
Parameters 3 von 'unsigned char *' in 'unsigned short *' nicht moeglich
Die Typen, auf die verwiesen wird, sind nicht verwandt; die Konvertierung
erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder
Funktionsformat
Why does the compiler tells something about SQLDriverConnectW while I use
SQLDriverConnect without W? I assume SQLDriverConnectW uses SQLWCHAR instead
of SQLCHAR, right? And SQLWCHAR is mapped to short, right? But why is
SQLDriverConnectW called and not SQLDriverConnect?
Any ideas?
Ralf.
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general