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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsAlternative DBsAlternative DBs
Previous
 
Next
New Post
9/3/2007 9:08 PM
 

Hi .... I don't know if this is an appropriate place to post a simple question like this (apologize if it's not), but here goes:

I'm implementing a shared hosted website with DNN .... There is the DNN SQL Server database and a second SQL Server db that I've imported named "Manuscripts" that has its own ID string on the hosting provider's server.

I'm trying to test reporting out of the Manuscripts db using the DNN Reporting module (sample query: Select * from tblAuthors) and I keep getting an error.  No problem running a report on the DNN DB ((e.g. Select * from aspnet_users).   I've tried qualifying the sql every way I can think of (e.g. Select * from [Manuscripts].[tblAuthors] or qualifying with the ID string) and no go.  The website host uses the Metropolis install of DNN. 

Is there something I'm missing, reference to a DSN.  Unfortunately the host's documentation and support aren't getting me anywhere.  I should be able to query another sql server db on the same server, right?

Thanks in advance ....Marc

 

 

 

 
New Post
9/4/2007 12:42 AM
 

I believe you can do this using the "USE" statement or by fully qualifying the table name. So if you want to run this query: "SELECT * FROM tblAuthors" on the "Manuscripts" database, you can enter this script:

USE Manuscripts;
SELECT * FROM tblAuthors

Or this one:

SELECT * FROM [Manuscripts].[dbo].[tblAuthors]

This is required because the current version uses the same connection as DotNetNuke does, so it limited to the DotNetNuke database by default. However, the next version of the module (version 5.0) will support executing queries against other SQL Server databases, databases on other SQL Servers, and many other datasources. Check out my blog post on the new module for more details.


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
New Post
9/4/2007 2:10 AM
 

Hi Andrew,

Thank you very much.

I actually had tried your second idea  (SELECT * FROM [Manuscripts].[dbo].[tblAuthors]) and it hadn't worked. 

I just now tried your first idea and it didn't fly, unfortunately.  When I try to run it on the provider's Query Analyzer, I get a slightly more revealing error message - something along the lines of the second db not being available in the current 'security context' - this seemed to be the host's language.   I think my options at present are to somehow penetrate their user tools' (or support staff's) obstacles  ...or .... import the objects in the second database into the DNN database.   It just seems like poor housekeeping to throw them all together.   Or I can do it in asp.net or wait till they adopt your new release.   So I have lots of options.


Thanks again!

Marc

 
New Post
9/4/2007 4:27 AM
 

Hey Marc,

Maybe the OPENDATASOURCE function in T-SQL can help you out.

This is the example i found in books online.

SELECT *
FROM OPENDATASOURCE('SQLNCLI','Data Source=London\Payroll;Integrated Security=SSPI').AdventureWorks.HumanResources.Employee

 

Hope this works for you.

Dave

 

 
New Post
9/5/2007 1:34 AM
 

Hi Dave,

Thanks for the tip .... I will try it when I get in tomorrow  (+/-) and let you know.

Cheers!

Marc

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsAlternative DBsAlternative DBs


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