Check the "owner" of the table.  If the owner is not dbo (sa) then you
need the dbo.tblxxx part added on.  This is similar to dsnabc..tblxxx
which assumes dbo between the 2 periods.


You only need the database part prefixing that if you're going outside
of the database.


-----Original Message-----
From: Cathy and Dave [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 04, 2004 13:11
To: SQL
Subject: Qualified? table names


For some reason, tables in one of my SQL 2k databases require a
qualified name to work, ie.
   
this works fine (using ColdFusion 5.0):
    <cfquery name="q1" dsn="dsnabc">
        SELECT * FROM dsnabc.dbo.tblxxx
    </cfquery>

this fails:
    <cfquery name="q1" dsn="dsnabc">
        SELECT * FROM tblxxx
    </cfquery>

with:
    ODBC Error Code S0002 (Base table not found)
                ...Invalid object name 'tblxxx'

What's killing me is the table doesn't show up in a:
    SELECT table_name FROM information_schema.tables

Is there any way to make this table show up here. And what's "different"
about the way this db/table was created?

    TIA

        Dave
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to