0

I am trying to display a sql query result on a page in my Sharepoint site. After looking around I found instructions on how to do that using the Content Query Web part. The instructions to enable that feature instructions here include activating the SharePoint Server Publishing Infrastructure. I currently don't have that option. Is there something I can install to my sharepoint site to get that option? Is there a better/easier way to display the results of a sql query in sharepoint?

1 Answer 1

1

Make sure to look in your "site collection features" instead of your site feature. This feature needs to be activated at the root level of the site collection.

FYI the Content Query WebPart only retrieve content from your site collection (by crafting a relevant CAML query, which is finally transformed to SQL query). You don't have the possibility to create a direct sql query and receive the result.

If you need to query another database than the one SharePoint is using (avoid accessing it from SQL at all cost !), you'll need to rely on the Business Connectivity Service, a data view webpart (using SharePoint designer), or create a simple webpart that will be responsible for everything (connecting to the db, doing the query and rendering the result in any way).

Hope it helped.

Sign up to request clarification or add additional context in comments.

3 Comments

It is not in the "site collection features", but you answered my question in regards to " Is there a better/easier way to display the results of a sql query in sharepoint?" I will have to research the Business Connectivity Service.
Is there a Business Connectivity Service for Sharepoint 2007?
it's called the business data catalog in 2007

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.