Cannot execute data definition statements on linked data sources - A2003

  • Thread starter Thread starter Larry Mehl
  • Start date Start date
L

Larry Mehl

Hello --

I want to maintain my backend mdb using code in my frontend.

example:
DROP and ADD constraints
CREATE TABLE

I receive error 3611 - Cannot execute data definition statements on linked
data sources

Is this not a recommended way to do things?

Can anyone recommend how to perform this kind of maintenance?

My coding skills are beginner-intermediate; I would appreciate an example,
pseudo-code, or URLs which can help me.

Thanks in advance for any help.

Larry Mehl
 
You just need to get a connection to the back-end database and execute the
SQL statement using that connection. If using DAO, use DbEngine.OpenDatabase
instead of CurrentDb. If using ADO, open a new ADODB Connection instead of
using CurrentProject.Connection.
 
The error message is giving you the answer. It says you have to do that from
the backend, you can't do it from the front end.
 
Back
Top