Data Links & SQL Stored Procedures - Essentials Manager 3.9
How can one configure a datalink to execute a stored procedure?
This was something that we took advantage of a lot in the WebADF environment and would like to take advantage of in the REST based viewers.
I tried the old.. EXECUTE [SchemaNameHere].[SPROC_Name] @Parameter and while I dont get an error, I don't receive any data.
-Alex
-
What does the procedure looks like - From my memory to SQL I think you need to make sure that the Procedure returns a tablevariable (in SQL server at least)
- Sune
0 -
To answer my own question, Stored procedures are supported in data links, the syntax is shown below. Just make sure you have execute permissions on your schema's.
/customer/servlet/servlet.FileDownload?file=00P6000000e88HAEAY
0 -
Alex,
Just intrigued what your doing calling a stored procedure from a data link? Can you explain how you use it?
Brad
0 -
In this particular example I was returning work order information for Fire Hydrants from our asset management system. But I find using stored procedures a benefit over storing SQL code within the Geocortex project if the SQL syntax is particularly complicated with many joins etc or I can reuse the SPROC for other things link reports. Plus for our environment we like to maintain most of our SQL query's as stored procedures vs storing query's within applications as it gives us a extra measure of organization.
0 -
Just an FYI for anyone looking for help with SP. We are also moving to stored procedures for sql queries for pretty much the same reasons Alex listed. I tried for two or three days to make them work through Essentials but couldn't. The query would run successfully but would never return any values. I finally figured out what Alex meant by execute permission on the shema. You have to grant the user you used to create your data connection in Essentials Manager execute permission on the stored procedure.
For what its worth we also tested table value functions. They work just fine in Essentials but are not flexible enough for our needs.0 -
Hi Daniel,
When you say-
"You have to grant the user you used to create your data connection in Essentials Manager execute permission on the stored procedure"
Does the user in essentials require permissions to execute or the user that is used as the username in the dataconnection?
I know its been some time, just stumbled upon this today.
Thank you0 -
To clarify, if the user info was used in the data link connection string, that user would need execute permissions on the SP. Otherwise Windows Integrated security would be used and in that case, the identity running the Essentials App Pool would need execute permissions. The App Pool is typically called EssentialsAppPool4 but the name and the identity the App Pool runs under are changeable.
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
7 Kommentare