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 ForumsReportsReportsQuery DatabseQuery Databse
Previous
 
Next
New Post
7/30/2007 1:48 PM
 

Someone could help in a way to query another DB in same server ?

In a normal way we made

SELECT dbo._Name, dbo._Adress FROM anotherdb.dbo.table WHERE something

 

but if i made it in the reports section it give a empty query.

 

 
New Post
8/1/2007 12:57 PM
 

I dont know if I fully understand your issue so I am not sure how much help this will be, but I was able to query another database with the reports module by changing the connection string located in the SqlDataProvider.vb class

 

hope this helps Mike

 
New Post
8/1/2007 1:18 PM
 

That trick will work, but it is a very unsupported workaround that will affect your entire installation (all portals using the same codebase). However, the next version of Reports (coming in the next month or so, hope to have some more news soon, keep an eye on the DNN blogs) will allow a module to query, not only another database, but completely different data sources including other SQL Servers, OLE DB, and others.


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

 
New Post
8/1/2007 1:53 PM
 

Your posting should work IF the DotNetNuke database user has permissions to that specific database table.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
8/1/2007 3:05 PM
 

If you know the appropriate connection string to access the "other" database.  You can use a module like SQLGridSelectedView (www.tressleworks.ca) or SQLView (www.dnnstuff.com) to access the database.  These modules are free and allow the user  to specify the connection string to be used when accessing a database.  

For example, you can use the existing DNN database connection string where the database is defined and change it to the "other" database, then you can perform selects without referencing the database name.    If you have Northwind example database installed, you can used something like:

Server=(local);Database=Norhtwind;uid=uuuu;pwd=ppppp;

as the connection string.  For help with connection strings, see www.connectionstrings.com   Based on the connection string you can access a Excel file,  MS Access, Oracle, MySQL, and many other data stores.

Hope this helps,
Paul.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsQuery DatabseQuery Databse


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