Select to view content in your preferred language

Query SharePoint SQL Server

999
3
07-30-2010 07:10 AM
JuneAcosta
Frequent Contributor
Using the Javascript API, is it possible to connect and query a SQL database in sharePoint? I saw a demo with a Flex viewer where additional data was queried from a SQL database in sharePoint. Its a functionality I need and I am trying to find out if its possible with using the Javascript API?
0 Kudos
3 Replies
RaviKonaparthi
Deactivated User
Hi,

You need to write custom code in .NET using SharePoint DOM fetch the data and you ca use thew data in JavaScript.

You can achieve this by creating your .NETfunctionality in aspx page and calling the aspx page using dojo.xhrget (or) dojo.xhrpost. And in the call back handler of the dojo function you can get the data from the aspx page, which you can use in your JS API.

Let me know if you need more details.

Regards,
Ravi.
0 Kudos
JuneAcosta
Frequent Contributor
Ravi,

Right now our web developer passes xy coordinates to bing map to locate facilities in our city. The admin folks of the data enter all the details for the facility within sharepoint... this info gets fed into the bing map as the content for the facility. They can add the hours of operation and the details about the facility- they have full control of the content. This is a great workflow but the maps arent as nice as using GIS data. The GIS department would like create a interactive map to replace this locator, but we need to keep the same workflow so we are not responsible for the content. I dont have a whole lot of experience wth the ArcGIS server and the available API's so I am trying to determine that best API for this functionalty. Would it be easier to use the Flex or Silverlight for this functionality? Does anyone else have any ideas on how to accomplish this same workflow?

Thanks.
0 Kudos
HaroldBostic
Frequent Contributor
Have you ever heard of or tried Map It: http://resources.esri.com/mapit/

It has sharepoint webparts that provide a ton of functionality and intended to be embedded right in sp.  it also comes with a Spatial Data Service that makes your sp data available as REST endpoints and consumable with the Silverlight API.  The web parts are developed in Silverlight (although no programming is required when using the web parts) However, the SL API is the only ESRI API that can consume a spatial data service (that I am aware of).  It cost only (1500.00), and 900 for yearly maintenance I believe (at least that's what I was quoted a year ago)

Sounds like the solution you need......
0 Kudos