Ask a Question related to Coldfusion Database Access, Design and Development.
-
skatedork #1
Database Invalid Object Name
Ok so I am upgrading from a coldfusion 4.5 site and I set everything up,
however, I am getting the following error whenever I try to connect to a
database table. I checked my permissions and they seem to be fine. This all
worked before I did the transfer.
Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name
'PRODUCT_HIERARCHY'.
The error occurred in C:\web\[url]www.drs.com\custom[/url]
tags\setApplicationGlobalVars.cfm: line 642
The SQL I am trying to run is as follows:
<CFQUERY NAME="getHierarchy" DATASOURCE="DRSWEB">
SELECT A.product_hierarchy_id, A.product_group_id, A.product_category_id,
A.product_sub_category_id, A.product_id,
C.Group_name, D.category_name, E.sub_Category_name, F.product_name
FROM PRODUCT_HIERARCHY A LEFT OUTER JOIN PRODUCT_GROUP C on
A.product_group_id = C.product_group_id
LEFT OUTER JOIN PRODUCT_CATEGORY D on A.product_category_id =
D.product_category_id
LEFT OUTER JOIN PRODUCT_SUB_CATEGORY E on A.product_sub_category_id =
E.product_sub_category_id
LEFT OUTER JOIN PRODUCT F on A.product_id = F.product_id
order by A.product_group_id, A.product_category_id,
A.product_sub_category_id, A.product_id
</CFQUERY>
Anyone have any idea why this would be happening? I ran the SQL query in SQL
Manager and it runs fine. Any help would be greatly appreciated =)
skatedork Guest
-
SQL invalid object name
I used SQL administrator to copy a database. Registered it successfully with XP, and CF Administrator. I can run query analyzer with the new... -
Invalid object name
So, this keeps popping up. I'm running scripts to create databases and ODBC connections and this error pops up quite frequently. It's not good. ... -
Invalid Object Name??
BTW, I'm using CFMX7 on Win2003Server -
Invalid Object Name??
I am having sort of the same problem. The query works fine until I go into Enterprise Manager and edit some content in the table the query is using.... -
Invalid object name 'TABLE'
Can someone please tell me why I keep getting the following error? I think it is part of the connection but can't pin down the exact error. I would... -
MikerRoo #2
Re: Database Invalid Object Name
Most likely, the database was moved/upgraded too.
In SQL Server, Enterprise Manager, change the login that is used by your data
source -- set the default database to the one that contains PRODUCT_HIERARCHY.
Or you can rewrite your code to fully qualify all SQL objects -- for example,
the following code probably works right now (fill in the correct value for
"YOUR_DATA_BASE_NAME"):
<CFQUERY NAME="getHierarchy" DATASOURCE="DRSWEB">
SELECT *
FROM [YOUR_DATA_BASE_NAME].dbo.PRODUCT_HIERARCHY
</CFQUERY>
Cheers,
-- MikeR
MikerRoo Guest



Reply With Quote

