Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...SQL problem after upgradeSQL problem after upgrade
Previous
 
Next
New Post
7/9/2014 6:50 AM
 

Hi, We are just  in the process of a staged upgrade from 5.6.8 to 7.2

Most things are working ok, but I have a problem with SQL queries. SQL queries which run ok on the old version are returning a 'Invalid object Name' error next to table names.

I have listed the tables in the database and the table exists. 

Is there different syntax I need ?

Thanks for any help

Vicky

 
New Post
7/9/2014 8:14 AM
 
Vicky,

could you please post an example query and the logged error from the error log (if any)?

And: I assume you are using Host :: SQL to run the queries, or is that wrong?

Best wishes
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
7/9/2014 8:26 AM
 

How are you running the SQL?  Are you executing them directly in SSMS or in DNN via the SQL page in the Host menu?

Or is the SQL executed from your modules?

What schema do the tables belong to?  Is it dbo?

If you are executing SQL like ... "Select * From SomeTable" try changing that to "Select * From dbo.SomeTable"



Professional DNN Extensions, custom solutions and mobile apps since 2003.
www.OnyakTech.com
 
New Post
7/9/2014 8:59 AM
 
Hi
The problem arose from a SQL statement I use in OWS and this failed to work after the upgrade

SELECT number,picture,english,welsh from tblSelection JOIN tblPictures ON
tblSelection.OOO1 = tblPictures.Number
OR tblSelection.OOO2 = tblPictures.Number
OR tblSelection.OOO3 = tblPictures.Number
OR tblSelection.OOO4 = tblPictures.Number
where cast(cast(tblselection.StartDate as varchar(30)) as datetime) < getdate() AND getdate() < dateadd(day,7,cast(cast(tblselection.StartDate as varchar(30)) as datetime))


With an error related to 'invalid object name' on the table name tblSelection

So I ran the same query through Host > SQL and it runs on DNN 5.6.8 but not 7.2
So I ran a simple

select * from tblselection

through both sites - again 5.6.8 ok but 7.2 gives

Invalid object name 'tblselection'.


I hope that answers the questions but let me know if further info would be helpful
Thank you
 
New Post
7/9/2014 9:07 AM
 
Could you please try to run this query:

select * from {databaseOwner}{objectQualifier}tblselection

Best wishes
Michael



Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...SQL problem after upgradeSQL problem after upgrade


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out