SQL-Retriever ODBC

FAQ

FAQ: Object variable not set/Object is invalid or not set

Problem: An error message is sometimes returned from SQL-Gold when it has nothing to return. For example, run:

select * from sales into temp fred

which returns no data to Gold legitimately, but shouldn't really show an error.

Gold (16-bit) gives the error: Object variable not set

Gold (32-bit) gives the error: Object is invalid or not set

This problem can also be caused by Gold's Tables button having nothing to display.

Cause: The problem is generated within the dynaset handling within Visual Basic 3. SQL-Gold cannot trap the "Object variable not set" error and therefore cannot prevent it from being displayed.

These are two methods of executing statements:

  1. using a snapshot
  2. using a EXEC SQL

All select statements were being executed as method (a). Any select statements with an INTO clause were causing the error "Object variable not set". This error occurred because the number of rows affected wasn't being returned from these statements and therefore was not setting the snapshot property which states the number of rows that had been affected. This property was then being used to determine the number of rows to be displayed in the Grid control.

Solution: This has been changed to all Select statements with an INTO clause as being executed as method (b), available in SQL-Gold 4.01.

Notes: In many cases in Gold, this error can be ignored. It's simply saying that there is no data to return, but this may be quite legitimate, for example if there are no Tables in the database or no rows of data in a table or the select is into a temp table.

 


SQL-Retriever: ODBC driver
Home | Software | Background | Library | Configuration | Versions | Security Manager | Debug | FAQ |
Site Map; Accessibility;


Last modified: Wednesday, 22-Mar-2017 15:46:40 GMT