SQL Server tables not owned by "dbo" - how to reference them?
From: ITM (itm_at_nospam.com)
Date: 01/23/04
- Next message: Joe: "Re: choices regarding where to place code - in the database or middle tier"
- Previous message: JDM: "Query table and column comments with JDBC"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Joe: "Re: choices regarding where to place code - in the database or middle tier"
- Previous message: JDM: "Query table and column comments with JDBC"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|