Your Shopping Cart Is Empty
 
External Sources
Last Post 08 Jul 2010 02:34 AM by Joe. 12 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Joe New Member New Member Posts:35 Avatar
--
07 Jul 2010 03:55 PM  
I need some help/pointers in using an "external source" for articles.

The situation is that I have some "articles" in a database table that is part of my DotNetNuke installation. How do I create an article pulled from that table?

DNNMasters Advanced Member Advanced Member Posts:732 Avatar
--
07 Jul 2010 03:57 PM  
You can pull data rows from SQL using the "External Sources".
So if you have an article stored there you can pull it and display.
However, this was added rather as means of showing data tables rather then articles.
Joe New Member New Member Posts:35 Avatar
--
07 Jul 2010 04:04 PM  
Can you give me an example of how to set this up? Should Name or Connection Name be set to SiteSqlServer?
DNNMasters Advanced Member Advanced Member Posts:732 Avatar
--
07 Jul 2010 04:19 PM  
Please give me few minutes. I'm now setting up test site for a quick refresher course on it.
DNNMasters Advanced Member Advanced Member Posts:732 Avatar
--
07 Jul 2010 04:35 PM  
I'm testing on dnn 5.4.2 and there seems to be a problem with connecting to database.
I'll have module developer available in 2 hours and we'll check and fix it.
Joe New Member New Member Posts:35 Avatar
--
07 Jul 2010 06:17 PM  
No problem. My development site is actually 5.4.3 (upgraded before they pulled it, and I'll probably want to try upgrading to 5.4.4 next week).
DNNMasters Advanced Member Advanced Member Posts:732 Avatar
--
07 Jul 2010 06:20 PM  
This shouldn't matter.
We are working on it now.
aroo New Member New Member Posts:10 Avatar
--
07 Jul 2010 08:06 PM  
Hi.
Here I put some explanations how to use external sources.
First of all place on some tab module: DNNMasters.CB.ExternalSources. This is where you can define external source. This module allows to get data from local database or external database. You can create select which gets data and put it into an article.

Creating external source

To create new external source click on link: "Add new soruce". Edit external source wizard should appear. You must specify name of external source, connection name and type of source: local or external. For local source module should show list of databases from SQL server which connect current DNN instance. Of course if SQL user has rights to list other database. If you want to use other SQL server or other sql user you have to select Remote type of source and set proper connectionstring in format:
Data Source=.;Initial Catalog=databasename;User ID=username;Password=pass;

After that please click on green arrow at the left of databases list. If module could connect to  selected database, there should be available tables list. Click on any table will list of table's columns.
After that you have to click on Connect To Database link.

When connection is ok, you have to edit query for getting data. You can type query in the "Enter or edit Query" field. If it is done, click on Update link. Source should be saved and could be used in article.

Using external source in article
To use external source in article, please click on edit link of article. Go to tab Body. Your created external source shuld appear on the "External sources" list. Please click on item and in the textbox under list should appear text. e.g.:

This text must be copied and paste into article body. Please copy this text and leave editing article. Click on article edit link one more time and paste this copied text into article body.
(This must be done this way, because of there is problem with refreshing data after external source selecting. This will be fixed in the next version of module.)

Save your changes, go to view article. If everything is ok, data from external source should appear in the table.

Regards
Arek
Joe New Member New Member Posts:35 Avatar
--
07 Jul 2010 10:57 PM  
Thanks for all of this information. I still cannot figure out what to use forthe name and connection name. Can you help me with that? I want to use the site's DNN database.
DNNMasters Advanced Member Advanced Member Posts:732 Avatar
--
08 Jul 2010 12:01 AM  
Please select "Local" and you'll see databases on SQL server where the portal resides. Select database to use and next select table.
Joe New Member New Member Posts:35 Avatar
--
08 Jul 2010 12:13 AM  
When I click the Local radio button, I get a popup that says "The data could not be loaded."

DNNMasters Advanced Member Advanced Member Posts:732 Avatar
--
08 Jul 2010 02:10 AM  
Did you download today's version 3.0.30 ?
This is the bug that was fixed today and HTML encoding was also added so you can use html content from database.
Joe New Member New Member Posts:35 Avatar
--
08 Jul 2010 02:34 AM  
Ah, that's it. You didn't mention that you'd created a new version. Thanks.
You are not authorized to post a reply.

Active Forums 4.3