<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Call stored procedure when form is deleted</title><link>https://www.infopathdev.com:443/forums/thread/14823.aspx</link><pubDate>Wed, 04 Oct 2006 06:02:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14823</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14823.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14823</wfw:commentRss><description>Hi Justin,&lt;br /&gt;I'm assuming your database is separate from the SQL database used for SPS. You could uniquely identify the DB record using a guid or some sproc in the database and then pass this unique id to another sproc or web method to handle the delete. We do this in our Database Accelerator by storing a Document ID in the PI of the form. Good luck!</description></item><item><title>Call stored procedure when form is deleted</title><link>https://www.infopathdev.com:443/forums/thread/12956.aspx</link><pubDate>Wed, 04 Oct 2006 05:58:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12956</guid><dc:creator>justin.k.tang</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12956.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12956</wfw:commentRss><description>Hi All,&lt;br /&gt;&lt;br /&gt;We have a requirement from the client, which is to create a record in the database when a new form is published to the SPS and delete the record relating to the form when the form is deleted from the SPS.&lt;br /&gt;&lt;br /&gt;We have already achieved creating a record in the database while adding a new form, by calling a stored procedure in the script.js:&lt;br /&gt;&lt;br /&gt;    XDocument.QueryAdapter.Command = CallSP;&lt;br /&gt;    XDocument.Query();&lt;br /&gt;&lt;br /&gt;However, in the case of deletion, the only way I can think of to keep the persistency is to do something in the context menu on the Document Library Page (with the "delete" option). I found the "DeleteDocLibItem" function in OWS.js file on the server which is the "event handler" for the deletion in the context menu. But the problem is how do I call a stored procedure in this js file?&lt;br /&gt;&lt;br /&gt;Or is there another way of doing this?&lt;br /&gt;&lt;br /&gt;Thanks in advance.&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Justin</description></item></channel></rss>