An attempt was made to issue a select statement using the Execute method (Error 40057)

You attempted to issue a SELECT statement using the Execute method. This error can also occur when you execute a stored procedure that contains a SELECT statement.

To issue a select query, you should instead use the OpenResultset method. The Execute method is designed for use with action queries (Insert, Update, Delete).