Last post May 31, 2012 01:35 PM by LugyLogger
May 30, 2012 12:45 PM|LugyLogger|LINK
Is is possible to call a stored procudure that has been added as a method in the data context from a button in a page template? I have a bulk update operation I would like to expose to the users.
May 31, 2012 12:10 PM|sjnaughton|LINK
is this for ASP.Net Dynmaic Data?
May 31, 2012 12:21 PM|LugyLogger|LINK
Yes, maybe I didn't explain my problem well enough or the answer is so simple that it makes the question sound out of place I
am using a Dynamic Data site as a way to expose records that have errored out in an interface. They all sit in a single table and DD seemed like a great way to display/update them without too much coding. I have a status field that flags the records to flow
back into the interface. In certain cases the records in a batch will all error out for the same reason. In these cases I would like the ability to call a stored procedure from the list page that will send all the records at once when the problem with the
destination system has been fixed. I have added the sproc to my linqToSql class as a method and I was hoping to just be able to call that.
May 31, 2012 12:25 PM|sjnaughton|LINK
OK no problem what data model are you using becuase that is what will limit you accessing SPROCS.
May 31, 2012 12:27 PM|LugyLogger|LINK
I am using linq to sql.
May 31, 2012 01:03 PM|sjnaughton|LINK
All you do in L2S is add the SPROC to the Methods pane and then it will be available from the data context.
May 31, 2012 01:08 PM|LugyLogger|LINK
That is what I have done, so I guess my question now is how would you access the data context from your page template?
May 31, 2012 01:17 PM|sjnaughton|LINK
I would expect this is acustom page I just instantiate a context myself and then execute the SPROC
May 31, 2012 01:26 PM|LugyLogger|LINK
Thank you that worked! I knew it was something simple like that but for some reason I just couldn't put the pieces together. I think I have been developing with BizTalk for too long
May 31, 2012 01:30 PM|sjnaughton|LINK
no problem :)
May 31, 2012 01:35 PM|LugyLogger|LINK
Is there an easy way to force the gridview to refresh after execution?