Forum Discussion
AlexKaras
Champion Level 3
Hi Abhi,
Then, most probably, the conn.Execute_(execQuery); line returns forward-only recordset (I used to use plain ADO objects and explicitly specify recordset parameters).
If this is the case, then you should just omit the call to .MoveFirst().
Note, that in case of forward-only recordset it is not possible to rewind it and you must close and re-open it if you need another iteration.
Adagio
7 years agoFrequent Contributor
Hi Alex,
I found out the reason. It's because of just one field in the SQL query which is returning a NULL value. The query had 100 different fields, and I had to check every one of those. Just one field which is highlighted below is causing this issue.
Could you please suggest if there's any way to avoid this problem?
SELECT CASE WHEN CSTHNK > 80 THEN '19' CONCAT CSTHNK ELSE '20' CONCAT CSTHNK END as F74_CSTHNK_ThnkYouNoteSentYr_Conv, BYTSK,
MGPORM,
PRMCSK,
TSHIKOG
FROM CUSMAS WHERE CSCSNR = 1482
Thank you
Abhi