Firstly I’m a complete newbie when it comes to mssql. I have five MSSQL databases, In all of them except one I can easily do say…
SELECT TOP 10 * FROM dt_Organizers
However one of the new databases require me to do this:
SELECT TOP 10 * FROM dbuser.dt_Organizers
Note that all the tables in all databases have “dbuser” “dbamy” “dbyon” “dbmio” “dbcana” prefixes respectively, this never caused a problem before. Now if I use the query without doing dbuser.dt_Organizers it brings up:
Warning: mssql_query() [function.mssql-query]: message: Invalid object name ‘dt_Organizers’.
What I think is going on is the users who create the tables are making them in their own schema, so, if you are logged in as dbuser and you do SELECT * FROM dt_Organizers you are really doing SELECT * FROM dbuser.dt_Organizers. Check out the default schema property for the users – should tell you alot.