function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdcrajsfdcraj 

Calling a SQL stored procedure from apex code

Hi, 

is is there anyway that I could call a SQL stored procedure from apex code.

i used db amp app to get all my Salesforce tables into SQL server to integrate with another database through stored procedure .
i want to call this stored procedure on click o a button on my visual force page.

can anyone please guide me???

regards,
pruthvi
ShashForceShashForce
Hi,

You have to make a web service (SOAP) callout or an HTTP (RESTful) callout from the visualforce page to achieve this. Please see this link for more help: https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
sfdcrajsfdcraj
Hi Shashank,

Are you sure about using web service (SOAP) callout or an HTTP (RESTful) because, I did not find any blog which says we can call SQL server stored procedure through apex code....

I am going through the link which you gave me.


Regards,
raj