SQL Server tables not owned by "dbo" - how to reference them?

From: ITM (itm_at_nospam.com)
Date: 01/23/04


Date: Fri, 23 Jan 2004 16:49:45 GMT

This is a follow-up from a previous post, which for some reason I
can't find on my news server!....

I have a SQL Server 2000 database which has been restored from a
backup. The restored database contained a user called "X", which is
the owner of all of the tables in the database.

When I try to execute an SQL SELECT against any of the tables in the
database (using the JDBC/ODBC bridge) I get an "invalid object name"
error - it seems to be requiring me to prefix the table names with
"X.", even though the ODBC data source has been set up with the user
"X".

Since this is a client's database, I have no control over ownership of
the tables, but I need to access them via ODBC in my application. JDBC
also isn't an option.

I've tried referring to tables using X.tablename syntax, but that
doesn't work. Can anyone tell what the correct syntax should be to
refer to these tables?

TIA
Isabel



Relevant Pages

  • RE: Access project vs. Access db
    ... Code and techniques that work fine in an MDB don't always work ... route with an MDB database file instead. ... > the SQL docs, but in the meantime, what is the correct syntax for Boolean ... Jet won't warn you of this logic error, but SQL Server does. ...
    (microsoft.public.access.modulesdaovba)
  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cluster will not fail over.
    ... > As far as the TCP/IP issue goes, you had to rebuild the cluster and were ... > able to restore the master database. ... > a cluster installation you'll have to revisit. ... >> This worked bringing up the sql server in minimal mode. ...
    (microsoft.public.sqlserver.clustering)
  • Re: MS Access DAO -> ADO.NET Migration
    ... full SQL Server and I see the logic you explained in a multi user ... allow two users to access the same database file Read/Write at any given ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MS Access DAO -> ADO.NET Migration
    ... For that it is much harder to handle the incremental identifier, ... database but although they have the data, they are not connected at the same ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... SQL Server Management Studio is nowhere to be found on my ...
    (microsoft.public.dotnet.framework.adonet)