Just wondered if there was a secret to do something like Database.Security.Users like AdventureWorks DB is setup. Seems no matter what I do to try to setup “Security.Users”, I always get the dbo in front of it and have a hell of a time in C# accessing the info. Am I doing something wrong?
Just wondered if there was a secret to do something like Database.Security.Users like AdventureWorks
Share
Are you trying to create an object called
Security.Userswith a dot? (as opposed toUsersin theSecurityschema?) That’s probably best avoided as you’re seeing, but if you are then the best way to quote the name is probably in square brackets, i.e.[Security.Users].dbois the default database schema name. Unless you’ve configured a different default schema for your users etc. you can usually just ignore it, although it’s still needed if you’re referencing another database by name.