I have this odd problem I began describing on the MS SQL Server forum, but was reccommended that there may be some new insight here:
I have an application that uses a basic SQLExecuteDirect, SQLFetch, SQLGetData (and an SQLDescribeCol based function to grab column numbers based on col names (which seems to work fine.) My problem is this: the program works just fine for MySQL, PostgreSQL, Microsoft Text ODBC. But for MS SQL Server 2000, it's grabbing junk data (duplication of 2 or so fields accross all 30 fields or so. I traced the problem back to the SQLFetch function call, which is returning SQL_NO_DATA. However, I have no idea why the Fetch call is consistantly working on the other 3 ODBC interfaces, and not on the MSSQL interface. Is there something special that must be done for MSSQL, or something that the others allow that MS does not? What could cause that SQL_NO_DATA error, and why would it not occur on the other databases (or only occur on MSSQL?)
I appreciate in advance any insight anyone can provide!
I have an application that uses a basic SQLExecuteDirect, SQLFetch, SQLGetData (and an SQLDescribeCol based function to grab column numbers based on col names (which seems to work fine.) My problem is this: the program works just fine for MySQL, PostgreSQL, Microsoft Text ODBC. But for MS SQL Server 2000, it's grabbing junk data (duplication of 2 or so fields accross all 30 fields or so. I traced the problem back to the SQLFetch function call, which is returning SQL_NO_DATA. However, I have no idea why the Fetch call is consistantly working on the other 3 ODBC interfaces, and not on the MSSQL interface. Is there something special that must be done for MSSQL, or something that the others allow that MS does not? What could cause that SQL_NO_DATA error, and why would it not occur on the other databases (or only occur on MSSQL?)
I appreciate in advance any insight anyone can provide!