Page 1 of 1

SQLFetchScroll not returning results

Posted: Sat May 17, 2014 4:49 am
by aligardezi
Hi,
I am facing a strange situation. I have bound 240 columns and when I try to use SQLFetchScroll to fetch the results, it errors out. However, when I reduce the number of bound columns to 230, it works fine. Is there some sort of a limit I am reaching?

Re: SQLFetchScroll not returning results

Posted: Mon May 19, 2014 2:54 am
by JimKnicely
What error are you getting?

Re: SQLFetchScroll not returning results

Posted: Mon May 19, 2014 7:26 pm
by aligardezi
The bindings on all the columns is successful. But the first call to SQLFetchScroll returns -1.

Re: SQLFetchScroll not returning results

Posted: Tue May 20, 2014 11:29 pm
by id10t
Hi!

[DELETED]

Re: SQLFetchScroll not returning results

Posted: Wed May 21, 2014 6:40 pm
by aligardezi
So I figured out the cause of the problem. I was providing a NULL for StrLen_or_Ind

in SQLBindCol( SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber,
SQLSMALLINT TargetType,
SQLPOINTER TargetValuePtr,
SQLLEN BufferLength,
SQLLEN * StrLen_or_Ind);

I figured it out by using SQLGetDiagRec to print the actual message.