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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Separate Client DatabaseSeparate Client Database
Previous
 
Next
New Post
11/12/2006 3:16 PM
 

Hi,

If I wanted to create a separate SQL 2005 database to contain tables that are specific to a particular client, how difficult would that be? I assume I would have to create a separate set of providers along with a separate xml config file. Where would I look for guidance and documentation regarding best practices? Has anyone done this? Would you be willing to give me some sample code?

Thanks,

GM

 

 
New Post
11/14/2006 8:08 PM
 

Hi,

can you be more specific, please. Separate dnn client or only separated data (database client) for other purpose? I do not understand the question well...

Primoz

 
New Post
11/15/2006 12:23 AM
 

Hi,

Thanks for the quick reply. I have a portal on a DNN installation for a particular client (customer). I need to create a DNN module that handles a number of customer tables that are connected by referential integrity constraints in another SQL Server 2005 database. Rather than creating duplicate tables in the DNN database for this specific customer I wondered how difficult it would be to create a DNN module and access these tables in a database that is not the DNN database but a completely separate one. What I would actually do is refresh the tables periodically from customer data. All of this data is highly specific to this customer so I thought keeping it completely separate might be a good idea. The standard Table Module is nice but for this particular case won't work very well for the data in all these interrelated tables.   

 
New Post
11/15/2006 5:32 AM
 

HI,

You can create your own module or you can use some like http://components.init.si/IndooGridDNNmodule/tabid/180/Default.aspx . What do you prefer?

Primoz

 
New Post
11/15/2006 8:10 AM
 
I do this all the time.  If you are building a module that is truly custom to you only, you can really do whatever you want.  The way I handle this is by developing my module as you normally would.  Then, in your stored proc, just reference the other database.  This assumes the other data you need is on the same server as your dnn database, but it does not need to be the same database.  Something like this...

SELECT
    'username' = u.username,
    'firstname' = u.firstname,
    'lastname' = u.lastname,
    'hiredate' = e.hiredate,
    'department' = e.department,
    'jobcode' = j.jobcode
FROM dotnetnuke.dbo.users U
JOIN companydb.dbo.employees E ON e.employeeid = u.username
JOIN hrdb.dbo.jobcodes J ON j.employeeid = e.employeeid
WHERE u.username = @username

The magic here is finding some way to map users from one databse to another.  There are lots of ways to do this.  The way we handle it is the DNN username is always the employee's employeeid.


 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Separate Client DatabaseSeparate Client 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