Problem:

User is trying to do a SQL_MoveFirsBuf(SQL_Socket) after running an SQL SELECT query but gets the following error in the debug window on the RPG2SQL PC component:

ERR   91 Object variable or With block variable not set

Solution:

Make sure they are using the SQL_RunSQLSel command with the SQL SELECT statement and not the SQL_RunSQLExec command. The SQL_RunSQLExec does not return a recordset.  If the SQL_RunSQLExec is used with a SELECT statement, when you try to move to the first record in the recordset you will get the error 91.

Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: December 10, 2016