When I tried to run an UPDATE statement from pass-through query, it throwed error “Cannot execute a select query”. This is due to that fact the property ReturnsRecords is set to True which requires the pass through query to return results. If it does not return recordset, it will throw an error. You can correct this error by
- Open pass-through query into design mode. Click on Properties button (Alt+Enter) and set Return Records to No
- Using program you can set QueryDef object’s ReturnsRecords property to False.
Leave a Reply