I have a fairly simple routine which retrieves a single field. But this
routine will fail after being called exactly 160 times !!!
char* getLastName(char* pId)
char* pRetVal = new char(51);
sprintf(Statement, "SELECT last_name FROM namemaster WHERE id='%'",
SQLINTEGER fieldLenOrInd = SQL_NTS;
SQLBindCol(m_hStmt, 1, SQL_C_CHAR, pRetVal, 51, &fieldLenOrInd);
SQLRETURN retcode = SQLExecDirect(m_hStmt, (unsigned char*)&Statement,
retcode = SQLFetch(m_hStmt);
For simplicity I removed all error handling, etc. It took me two days toQuote:}
figure out why. But I haven't got any clue.
Please help if you know anything about it. I am using SQL Server 7.0 and
Thanks a bounch!