Can't execute unprepared rdoPreparedStatement (Error 40017)

An ODBC error occurred trying to prepare the SQL statement passed in rdoPreparedStatement.Execute or rdoQuery.Execute

Check the rdoErrors collection for more detail and make sure the SQL statement for the rdoPreparedStatement or rdoQuery object is valid for the data source you are referencing.