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.0how can i connect another database in may sample dnn module using c#how can i connect another database in may sample dnn module using c#
Previous
 
Next
New Post
8/16/2008 3:31 AM
 

hi

I am using dnn starter kit.I develop a module so i need to connect another database but i don't know how i can do it. 

i have a button and a textbox.I want to edit something to my_database which i write in the textbox.

can you help me if you know something about it?

 
New Post
8/16/2008 11:33 AM
 

there are several ways you can do this but each of them would require some experience using DNN to start with..
Here are a couple of pointers that should get you started.

a) If your database is another SQL Server database or Oracle, simply add a new connection string in your web.config (in the right connection strings
b) In the code for your module, use the appropriate DNN methods to pull the connection string from web.config (if you want examples, look at the dataproviders for any of the existing modules).
c) Create a command/connection object using your new connection string.
d) write your SQL statement or call your stored procedure using a datareader, etc.
e) bind to your controls...


the key is creating another connection string in web.config and connecting to it via your module..
Sanjay


AcuitiDP - Oracle Data Provider for DotNetNuke
 
New Post
8/18/2008 2:39 AM
 

hi

i cannot understand you.maybe i add all wrong codes in my proje can you explain what i have to do, step by step.Like this:

add this code in ---

onnectionString>

i am waiting your answer

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0how can i connect another database in may sample dnn module using c#how can i connect another database in may sample dnn module using c#


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