I am trying to call a command to change a table owner to dbo.
Our company set-up means that all tables by default are create with my ID as owner.
However for other applications that use them they need to owned by the dbo.
I have the VBA that creates the table via ODBC and need to know if it possible to call the sp_changeobjectowner procedure from access.
I have tried
but is fails as it it looking for SQL type start of SELECT, INSERT, etc
It there another way to do this?
There are around 40 tables that need to be processed so I need to it to be automated.
Our company set-up means that all tables by default are create with my ID as owner.
However for other applications that use them they need to owned by the dbo.
I have the VBA that creates the table via ODBC and need to know if it possible to call the sp_changeobjectowner procedure from access.
I have tried
Code:
db.Execute"EXEC sp_changeobjectowner [ODBC;DRIVER=SQL Server;SERVER=SQLserver1;DATABASE=dbase1.MeOIwner.Table, 'dbo'
It there another way to do this?
There are around 40 tables that need to be processed so I need to it to be automated.