newguy
Member
Hi all,
I was wondering if anybody has had experience with ODBC calls in the newer release of E1 with the Unicode.
I've seen some people on here use the following code:
retcode =SQLConnect((SQLHDBC) ConnectionHandle,
(SQLCHAR *) ServerName,
(SQLSMALLINT) strlen(ServerName),
(SQLCHAR *) UserName,
(SQLSMALLINT) strlen(UserName),
(SQLCHAR *) Authentication,
(SQLSMALLINT) strlen(Authentication));
where servername, username, authentication were defined as CHAR.
I have gotten this code to work before. However, now i'm trying to make it work in E810 and seem to have type problems.
When I use the same code, the variables should be defined as JCHAR instead of CHAR. However, I can't compile using busbuild because I keep getting these warning messages:
" incompatible types - from 'unsigned char *' to 'unsigned short *'"
I believe the ODBC call is expecting an "unsigned char" to set as SQLCHAR, but JCHAR is actually an "unsigned short".
However, I tried changing the variables to ZCHAR, BYTE, and they don't seem to work, and I get the same compile messages.
Any help would be greatly appreciated.
thanks!
--Jim
EnterpriseOne E810
SQL Server
I was wondering if anybody has had experience with ODBC calls in the newer release of E1 with the Unicode.
I've seen some people on here use the following code:
retcode =SQLConnect((SQLHDBC) ConnectionHandle,
(SQLCHAR *) ServerName,
(SQLSMALLINT) strlen(ServerName),
(SQLCHAR *) UserName,
(SQLSMALLINT) strlen(UserName),
(SQLCHAR *) Authentication,
(SQLSMALLINT) strlen(Authentication));
where servername, username, authentication were defined as CHAR.
I have gotten this code to work before. However, now i'm trying to make it work in E810 and seem to have type problems.
When I use the same code, the variables should be defined as JCHAR instead of CHAR. However, I can't compile using busbuild because I keep getting these warning messages:
" incompatible types - from 'unsigned char *' to 'unsigned short *'"
I believe the ODBC call is expecting an "unsigned char" to set as SQLCHAR, but JCHAR is actually an "unsigned short".
However, I tried changing the variables to ZCHAR, BYTE, and they don't seem to work, and I get the same compile messages.
Any help would be greatly appreciated.
thanks!
--Jim
EnterpriseOne E810
SQL Server