Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does WCF cache stored procedures

Tags:

c#

sql

wcf

I have a WCF service that my client makes a call to telling it to run storedprocedure1, with param1, param2, etc.

When the WCF service gets this call, it instantiates a class that instantiates a DAO class. The DAO class creates the connection, loads the parameters into a SqlCommand object, then executes the object.

After finishing, it closes the SqlConnection, but does not close or dispose the DAO class, because there are multiple procedures it needs to run.

Here's the problem. If I edit storedprocedure1 and then call it through the WCF service, the changes I made in storedprocedure1 are not reflected until I restart the WCF service. Its like the storedprocedure1 is cached in WCF.

Has anyone else experienced this and is there a solution?

like image 651
edepperson Avatar asked Mar 01 '26 18:03

edepperson


1 Answers

I think the WCF service is caching the results of the stored procedure.

See this: http://msdn.microsoft.com/en-us/library/ee230443.aspx

like image 170
Scott Bruns Avatar answered Mar 03 '26 08:03

Scott Bruns



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!