Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error Executing Database Query

Guest
Aug 13, 2008 Aug 13, 2008
Have encountered an issue between
our earlier use version of Coldfusion (5.5) with the new version 8.0. when
working on a MS SQL data base.
Background
============
We do enhancements on a software solution which we built using CF 5.5,
running off Windows 2000 Server, with Microsoft SQL Server.
No problem.

Issue
======
We upgraded to Windows 2003 Server and CF 8.0, now the CFcode will not
work-- showing an "Error Executing Database Query" error.
Details are:

Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name
'hisworld.dbo.appControl'.

The error occurred in C:\Inetpub\wwwroot\DSP\authenticate.cfm: line 375

374 :
insert into [#Application.PDS#].[dbo].[appControl]
(appName,cfid,cftoken,User_ID)

375 :
values('#appName#','#CFID#','#CFTOKEN#','#Users.user_ID#')

Attached is a screen-shot of the column of the related table.
==============

Any ideas/advice on how we can get this CF 8.0 to work, given
the above error message?

Many thanks
Tokyo
TOPICS
Database access
688
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 13, 2008 Aug 13, 2008
Does the datasource you are using have access to database hisworld?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 13, 2008 Aug 13, 2008
Many thanks for the reply and good question.
I just checked the CF administrator and clicked "Verify all Connections", and under the tittles
Date Server Name // Drivers // Status
hisworld // Microsoft SQL Server // OK

So in answer to your question: "Does the datasource you are using have access to database hisworld?"

Yes, I believe so.
Would you have another idea or proposal that I could try?
Regardsm
Ghibiri
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 14, 2008 Aug 14, 2008
BTW, I added the following code to the error template:

DEBUG:<BR>
Application.PDS = #Application.PDS#

The output is:
DEBUG:
Application.PDS = hisworld
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 14, 2008 Aug 14, 2008
Once again, BTW, thinking on it, I have attached the entire code of the concerned template. When I code out the ' insert into' code, the error does not appear and the next page is correctly shown. However, as this code is the 'tracker' of users to the 'appcontrol' table, it is a must have code.
It is interesting to note that
--- select * from [#Application.PDS#].[dbo].[users]

work fine, while the "insert into" does not.

I am begining to think the table appControl needs something done to the colume-- just a thought.
Appreciate your follow up.
Regards,
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 14, 2008 Aug 14, 2008
This is still troubleshooting. What happens when you try

select *
from hisworld.dbo.appControl
where 1 = 3

?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 20, 2008 Aug 20, 2008
LATEST
It seems I dropped off your radar. What can I do to get back on? I am absolutely in a hole on this one. Whatever time you can lean is really appreciated.
Regards
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 14, 2008 Aug 14, 2008
Thanks.
Not clear on what you poropose. What I did was replace:

<cfquery name="getApp" datasource="#pds#">
insert into [#Application.PDS#].[dbo].[appControl] (appName,cfid,cftoken,User_ID)
values('#appName#',#CFID#,#CFTOKEN#,#Users.user_ID#)
</cfquery>
=========
WITH (what you suggested?)

<cfquery name="getApp" datasource="#pds#">
select *
from hisworld.dbo.appControl
where 1 = 3
</cfquery>
=============

Error output =>
Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'hisworld.dbo.appControl'.

The error occurred in C:\Inetpub\wwwroot\DSP\authenticate.cfm: line 377
…..
375 : values('#appName#',#CFID#,#CFTOKEN#,#Users.user_ID#)
376 : </cfquery>--->
377 : <cfquery name="getApp" datasource="#pds#">
378 : select *
379 : from hisworld.dbo.appControl

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

SQLSTATE 42S02
SQL select * from hisworld.dbo.appControl where 1 = 3
VENDORERRORCODE 208
DATASOURCE hisworld
------------------

Many thanks for being with me on this one and what to do next?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources