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...Administration ...Administration ...SQL & DNN, how does it work?SQL & DNN, how does it work?
Previous
 
Next
New Post
2/18/2009 3:32 PM
 

Hello,

I was wondering how you access live databases on DNN with sql?

normally you would need to connect to the database with a password, etc and then you could have your SQL code execute underneath, but I can't seem to figure out if that's what I need to do or if it's automatically connected because of it being on a live server etc...

Here's what I need to do, I need to write SQL into an ascx file (if that's possible) so that when a user loads the page it will pull up certain information from the database

such as...

SELECT * FROM Values WHERE UserId = this.UserId;

this.UserId might not be the right thing to use, but either way, I want to be able to use SQL functions to retrieve and display information from the database.

If anyone has any insight on how SQL works with DNN I would appreaciate your help. Thanks in advance!

Matt

 
New Post
2/18/2009 3:51 PM
 

See Michael Washington's tutorials on data access options, as well as DNN's Data Access Guidelines document.

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
2/18/2009 6:19 PM
 

Before you go too far with writing ad-hoc SQL queries from your own ASCX file, take a look at DNN's included REPORT module which lets you run SQL queries and display the results in a DNN page.

Beyond that, there are some free third-party modules available to do the same.  Here are a couple of "how-to" postings along with sample SQL code for doing just the type of thing you describe (also note the free Advanced Datagrid comes complete with module source code):

   Free module:  Advanced DataGrid (Part 1) -- Make a "Most Rcent User Signups" List
   http://www.eguanasolutions.com/DNN_Blog/EntryID/2.aspx

   Free module:  Advanced DataGrid (Part 2) -- Make an "Events Status" Table for the EVENTS Module
   http://www.eguanasolutions.com/DNN_Blog/EntryID/5.aspx

   Free module:  Advanced DataGrid (Part 3) -- Create a Clickable "Most-Commented" Blogs Module
   http://www.eguanasolutions.com/DNN_Blog/EntryID/13.aspx

   Free module:  SQLView -- Make an EVENTS List Sortable by City / County / State
   http://www.eguanasolutions.com/DNN_Blog/EntryID/15.aspx

 
-mamlin


esmamlin atxgeek.me
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...SQL & DNN, how does it work?SQL & DNN, how does it work?


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