I have a VB6 application that uses a dll for various functions within the application. Both are developed by me. The app was originally written for ADO database functions on a Jet (Access) database. I recently began converting both the app and the dll to use MySQL. When I try to update the MySQL database from within the dll code, I get 2 errors. One is about reading memory, the other about writing memory. Both say they can't be read/written. I use a simple UPDATE query like the following:

Connection.Execute "UPDATE table SET field = somevalue";

this raises the memory read/write errors.
I can execute the same code from the main application with no errors.
Question is: can MySQL databases be updated from within a dll using ADO; if so, what are the steps to be taken?