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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Problem connecting custom modules to another databaseProblem connecting custom modules to another database
Previous
 
Next
New Post
12/12/2014 9:32 AM
 

We are converting plugins from our old CMS to use on our new DNN site.
I set up my own data classes and DAL in the App Code folder of our DNN and built some data classes to connect and fetch the data.
Tests in our custom module using the DNN database are successful, fast and working correctly.

As soon as we point the connection to a remote database it does not return any data?
I have tried adding connection strings direct in the web config.
I have put sql datareader and command objects direct in the module codebehind page but no matter what we try no good.

Am I missing something?, is there a setting I must set. Any ideas ?

 
New Post
12/12/2014 10:03 AM
 

You have the connection string in the web.config, right?

Which version of DAL are you using? 

BTW, here is a thread on DNNHero about using another database with DAL2 http://www.dnnhero.com/Forum/forumid/...

 
New Post
12/12/2014 10:29 AM
 
erik hinds wrote:

You have the connection string in the web.config, right?

Which version of DAL are you using? 

BTW, here is a thread on DNNHero about using another database with DAL2 http://www.dnnhero.com/Forum/forumid/...

 Thanks for replying.

Yes, I have the string in config.

Not using any of the DNN module Dal templates, I am using my own Data classes and sql handlers in App Code that I have used for years and built hundreds of NTier apps with.
My classes work perfectly against the dnn database so nothing wrong there, but obviously something is preventing remote connection.
I have got a little further in  that I am now getting an sql error despite the connection working correctly from Visual Studio
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

We were holding off the DAL 2 templates as we only wanted very simple custom modules without the need for installing templates and having to package and install. We may have to now if we cannot get this fix working

I still believe it should be possible as the error shows it is trying to connect, just need to know what is causing the connection failure

 
New Post
12/12/2014 12:27 PM
 
if you are preferring to use named pipes, you need to enable this protocol for both, SQL Server and Client.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/15/2014 4:34 AM
 
Sebastian Leupold wrote:
if you are preferring to use named pipes, you need to enable this protocol for both, SQL Server and Client.

 Hi Sebastian,

tcip and named pipes are enabled on all the remote database server I am trying to connect to. I have to admit it is not an issue I have encountered before using connection strings  so at a loss.

Our DNN database is on a different server to the DNN CMS and the various connection strings in web config are exactly the same?  so I dont see any reason why I cannot connect to any of our other databases other than DNN

The connection strings work well in other sites/apps and visual studio,  and if I point my custom module query at a DNN table all works well?

So is the problem is within DNN itself?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Problem connecting custom modules to another databaseProblem connecting custom modules to another database


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