ColdFusion / SQL Error - Need Help

Upgraded ColdFusion broke my site

Page 1 of 1

3 Replies - 2375 Views - Last Post: 12 February 2010 - 07:52 AM Rate Topic: -----

#1 iamwebgod  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-February 10

ColdFusion / SQL Error - Need Help

Posted 04 February 2010 - 10:17 AM

I had this site designed for me about 10 years ago and then stoped using it.

This year I decided to bring it back but the ColdFusion version had changed from 3 to 8 and now I can only get parts of the website to work.

I am not familiar enough with the syntax to find the problem myself so I am going to post the code from the section that is currently giving me a problem and what the error is.

<cfquery name="get_body" datasource="#idatasource#" username="#iusername#" password="#ipassword#"> SELECT SymptomID,SymptomName,SymptomVarName,SymptomID_Cure FROM Symptom_Cat WHERE Symptom_Cat.CategoryID=4 AND Symptom_Cat.SymptomVarName='#rbodytype#' ORDER BY Symptom_Cat.SymptomName,Symptom_Cat.SymptomID_Cure </cfquery>


The error that I am getting is:
The following information is meant for the website developer for debugging purposes.

Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'Symptom_Cat'.

I have looked through my database extensively and can't fin't Symptom_Cat anywhere in it so I am assuming this is a syntax issue based on the earlier code or an older SQL.

I am using SQL 2005 now am just learning SQL and ColdFusion.

P.S. The #rbodytype# is calculated earlier on the page from form results on the previous page.

Any help would be appreciated.

Let me know if you need more of the code or any details from the database.

Thanks

This post has been edited by iamwebgod: 04 February 2010 - 07:23 PM


Is This A Good Question/Topic? 0
  • +

Replies To: ColdFusion / SQL Error - Need Help

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: ColdFusion / SQL Error - Need Help

Posted 05 February 2010 - 01:23 PM

The issue is that the query is looking for a table named Symptom_Cat and apparently your database doesn't have one. It's not a syntax issue nor is it related to the version of CF you're using.

Whatever your datasource called "idatasource" is mapped to, whatever database that is, it's lacking a table called Symptom_Cat...and that's your issue. Given that you said you're using SQL Server 2005 and that this app was from 10 years ago, you'll need to go back to your old database and import it into SQL Server 2005 and then adjust your database mappings to reflect the new datasource.
Was This Post Helpful? 0
  • +
  • -

#3 iamwebgod  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-February 10

Re: ColdFusion / SQL Error - Need Help

Posted 06 February 2010 - 04:24 PM

View PostCraig328, on 05 February 2010 - 12:23 PM, said:

The issue is that the query is looking for a table named Symptom_Cat and apparently your database doesn't have one. It's not a syntax issue nor is it related to the version of CF you're using.

Whatever your datasource called "idatasource" is mapped to, whatever database that is, it's lacking a table called Symptom_Cat...and that's your issue. Given that you said you're using SQL Server 2005 and that this app was from 10 years ago, you'll need to go back to your old database and import it into SQL Server 2005 and then adjust your database mappings to reflect the new datasource.


That is what I was afraid of...I have done the restore of the old database and looked through it for any tables that look like they closely match but there are none.

Thanks for confirming this for me...

I am looking through my old data now to try to rebuild the database to contain the appropriate tables and columns.

Thanks again
Was This Post Helpful? 0
  • +
  • -

#4 xheartonfire43x  Icon User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 454
  • Joined: 22-December 08

Re: ColdFusion / SQL Error - Need Help

Posted 12 February 2010 - 07:52 AM

You may also want to verify that there are no views setup with the missing table name.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1