I'm new in here so forget me if I'm doing anything wrong... (Such as wrong points estimation)
I have recently downloaded a c++ class for handling ODBC connection.
(I have took the code from http://www.codeproject.com/database/caaodbcclass.asp
It seems like this class doesn't taking into acount cases when ntext or text data is needed to be retriveed from SQL server.
For that matter, the function which handle the data reiteration looks like this:
lue(int nField, CHAR *szData)
int nLength = GetFieldLength(nField) + 1;
ret = SQLGetData(m_hStmt, (SQLUSMALLINT)nField + 1, SQL_C_CHAR, szData, nLength, &cbValue) == SQL_SUCCESS;
return ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO;
I have no problem getting any data type except for text and ntext sql server data types.
I would appresiate it if someone could help me on that, and send me a code sample (or adjusting the above function) so it would work as needed.
Any other information regarding this issue (Important notes) will be welcomed!