SQLFetchScroll not returning results

Moderator: NorbertKrupa

Post Reply
aligardezi
Newbie
Newbie
Posts: 5
Joined: Wed May 22, 2013 8:25 pm

SQLFetchScroll not returning results

Post by aligardezi » Sat May 17, 2014 4:49 am

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?

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: SQLFetchScroll not returning results

Post by JimKnicely » Mon May 19, 2014 2:54 am

What error are you getting?
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

aligardezi
Newbie
Newbie
Posts: 5
Joined: Wed May 22, 2013 8:25 pm

Re: SQLFetchScroll not returning results

Post by aligardezi » Mon May 19, 2014 7:26 pm

The bindings on all the columns is successful. But the first call to SQLFetchScroll returns -1.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: SQLFetchScroll not returning results

Post by id10t » Tue May 20, 2014 11:29 pm

Hi!

[DELETED]
Last edited by id10t on Wed May 06, 2015 5:21 pm, edited 1 time in total.

aligardezi
Newbie
Newbie
Posts: 5
Joined: Wed May 22, 2013 8:25 pm

Re: SQLFetchScroll not returning results

Post by aligardezi » Wed May 21, 2014 6:40 pm

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.

Post Reply

Return to “ODBC”