Skip to main content
September 26, 2012
Question

tablename is an invalid object

  • September 26, 2012
  • 3 replies
  • 871 views

Getting an error saying a table is an invalid object when doing a query.

Can query the table through sql.

What kind of things cause this ?

    This topic has been closed for replies.

    3 replies

    Inspiring
    September 29, 2012

    If you have configured Oracle datasource there for sql query then you can use below short cfquery example to check required datasource user & its permission to run query through CF server:-

    --------

    <cfquery name="query1" datasource="dsname">

    select user from dual

    </cfquery>

    Query Result:

    <cfdump var="#query1#">

    -----------------

    If it gives cfdump result then your datasource user are corrert so you will need to further check for your table schema.

    Carl Von Stetten
    Legend
    September 26, 2012

    When you say you can query the table through SQL, do you mean using an external tool from ColdFusion?  Could it be a permissions issue with the account you configured in CF Admin for that datasource (which might be a different account from the one you use in the external tool)?

    -Carl V.

    WolfShade
    Legend
    September 26, 2012

    If synonyms are not established, try prepending the schema name to the table (schema.table).

    ^_^