Showing posts with label owner. Show all posts
Showing posts with label owner. Show all posts

Tuesday, March 27, 2012

can not drop user from database

I'm getting the can't drop user error. Is there a way to change the schema owner via smo? I've tried the following code to change the schema owner back to a different user. I don't get an error or exception but the schema owner doesn't change.

Database database = new Server("my server").Databases["my Database"];

database.Schemas["db_owner"].Owner = "db_owner";

Never mind, the following worked.

Database database = new Server("my server").Databases["my Database"];

database.Schemas["db_owner"].Owner = "db_owner";

database.Schemas["db_owner"].Alter();

|||

John, giving that your question is SMO related, I split it from the thread you posted it in and I moved it to the SMO forum.

Thanks
Laurentiu

Saturday, February 25, 2012

Can I use Microsoft Access to add or modify fields in SQL Server?

I have recently upsized a medical departments database to SQL server. However, the Owner of the database wishes to add more fields using Microsoft Access. When he attempts to modify the linked table in Access, he get's the message that the table properties cannot be modified.

How can one use Access to add or modify fields in SQL server?It depends on the versions of SQL Server and Access being used, so for example Access 2000 can not modify SQL Server 2000 or SQL Server 2005 properties but Access XP/2003 should be able to.

Basically the version of access must have shipped after the version of SQL for this to work, but even then its not always the case.