Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to query another SQL Server from Sharepoint?

  Asked By: Arthur    Date: Dec 27    Category: Sharepoint    Views: 2400

Forgive me in advance if this question has already been answered or
should be asked somewhere else:

Running: SharePoint 2003 on Windows Server 2003

We want to create a web part that runs a SQL query on another SQL
Server database (on another local server) and displays the data in
the web part. This query should be run each time the web part is
displayed.

This seems so simple, but I can't find ANY documentation on it.

All/any help is much appreciated.

PS: I have Frontage 2003 if that's where I need to be going to
create this.

Share: 

 

10 Answers Found

 
Answer #1    Answered By: Sterling Allison     Answered On: Dec 27

Why not write an .aspx page that does your query  and save it to the /_layouts/ folder on your SharePoint Server and use the Page Viewer Web Part to display the results.

 
Answer #2    Answered By: Jessie Burton     Answered On: Dec 27

Using a dataview webpart wouldn't work?

 
Answer #3    Answered By: Kristopher Morales     Answered On: Dec 27

Where is the dataview web part? How do you import it?

 
Answer #4    Answered By: Marquis Ortega     Answered On: Dec 27

In FrontPage 2003, display the Data Source Catalog task pane (Insert Data
View from the Data menu).
Click the plus sign beside Database Connections
Click Add to Catalog... link
Click Configure Database Connection button
Provide a Server Name and credentials (Use Windows Authentication is
recommended)
Choose your database
Choose your table (if you want to run a custom query  you will have some
security work to do)
Click Finish
Choose your Fields, default Filter, and default Sort
Click OK
Drag the resulting Catalog entry into a Web Part Zone
You now have a Data View Web Part that you can use FrontPage to manipulate
to death

You should be able to take it from there...

 
Answer #5    Answered By: Javier Hawkins     Answered On: Dec 27

Yeah, what he said!

I leave my desk for three minutes to get a dew, and Todd is all over it.

 
Answer #6    Answered By: Tracy Bass     Answered On: Dec 27

That is fine IF FrontPage 2003 is available.

 
Answer #7    Answered By: Dominick Blake     Answered On: Dec 27

Thanks to all the replies I received on this question. Todd's reply
was exactly I what I was looking for

 
Answer #8    Answered By: Randall Hunt     Answered On: Dec 27

Do you know if there is anything special that needs to be done using
this technique to run a stored proc? I ran into this today where the
stored proc showed up in Query Analyzer but when I used Front Page, I
couldn't see it to execute it.

 
Answer #9    Answered By: Joe Hart     Answered On: Dec 27

Is a while since I configured one of these... am just looking at one I use now... once the database connection was configured, in the custom query  box I have EXEC {database}.dbo.{stored procedure}. This seems to work.

 
Answer #10    Answered By: Jorge Cole     Answered On: Dec 27

The stored procedure must be fully qualified something like this:

Exec dbo.myDatabase.SPUpdate()

 
Didn't find what you were looking for? Find more on How to query another SQL Server from Sharepoint? Or get search suggestion and latest updates.

Related Topics:



Tagged:        

 
 
 

Related Post