﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WebForms (How do I?)  » Customise Stored Procedure Updates</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 10:51:45 GMT</lastBuildDate><ttl>20</ttl><item><title>Customise Stored Procedure Updates</title><link>http://forum.strataframe.net/FindPost2189.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I have just downloaded the trail version and like the idea of being able to use stored procedures to handle the updates as this is our company policy. However looking at the documentation it seems that these stored procedures are being generated by the framework. We have have special requirements for the parameters passed E.G. Orginal values,update field flags and session information for logging who made the change.&lt;/P&gt;&lt;P&gt;In essence the parameters look something like this&lt;/P&gt;&lt;P&gt;create procedure dbo.smEXPSMASTER_ACD&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_ACTION&amp;nbsp;&amp;nbsp;char(1)&amp;nbsp;='',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_IDKEY&amp;nbsp;&amp;nbsp;IDKey&amp;nbsp;=0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_TSTAMP&amp;nbsp;&amp;nbsp;timestamp&amp;nbsp;=null,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;nbsp;Input Data Fields&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_USERCODE&amp;nbsp;&amp;nbsp;&amp;nbsp;UserCode&amp;nbsp;&amp;nbsp;= '',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;varchar(35)&amp;nbsp;&amp;nbsp;= '',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_NOMCODE&amp;nbsp;&amp;nbsp;&amp;nbsp;UserCode&amp;nbsp;&amp;nbsp;= '',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;nbsp;Update Flags&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_UPD_USERCODE&amp;nbsp;&amp;nbsp;&amp;nbsp;bit&amp;nbsp;&amp;nbsp;= 0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_UPD_NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;bit&amp;nbsp;&amp;nbsp;= 0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_UPD_NOMCODE&amp;nbsp;&amp;nbsp;&amp;nbsp;bit&amp;nbsp;&amp;nbsp;= 0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;nbsp;Original Values&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_ORG_USERCODE&amp;nbsp;&amp;nbsp;&amp;nbsp;UserCode&amp;nbsp;&amp;nbsp;= '',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_ORG_NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;varchar(35)&amp;nbsp;&amp;nbsp;= '',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_ORG_NOMCODE&amp;nbsp;&amp;nbsp;&amp;nbsp;UserCode&amp;nbsp;&amp;nbsp;= '',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;nbsp;Progress Parameters&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_PROG_SPID&amp;nbsp;&amp;nbsp;int&amp;nbsp;&amp;nbsp;=0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;nbsp;Session Parameters&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_SESS_USERID&amp;nbsp;&amp;nbsp;IDKey&amp;nbsp;&amp;nbsp;=0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_SESS_USERNAME&amp;nbsp;UserCode&amp;nbsp;='',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;nbsp;Audit Parameters&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_NOAUDIT_LOG&amp;nbsp;&amp;nbsp;bit&amp;nbsp;&amp;nbsp;=0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_AUDIT_MESG&amp;nbsp;&amp;nbsp;varchar(255)&amp;nbsp;='',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@I_AUDIT_SOURCE&amp;nbsp;&amp;nbsp;varchar(1)&amp;nbsp;='L',&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;nbsp;Output Parameters&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@O_IDKEY&amp;nbsp;&amp;nbsp;int&amp;nbsp;&amp;nbsp;=0&amp;nbsp;output,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@O_ERROR_TABLE&amp;nbsp;&amp;nbsp;varchar(30)&amp;nbsp;=''&amp;nbsp;output,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@O_ERROR_USERCODE&amp;nbsp;UserCode&amp;nbsp;=''&amp;nbsp;output,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@O_RETURN&amp;nbsp;&amp;nbsp;int&amp;nbsp;&amp;nbsp;=0&amp;nbsp;output,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@O_MESG&amp;nbsp;&amp;nbsp;&amp;nbsp;varchar(100)&amp;nbsp;= ''&amp;nbsp;output&lt;BR&gt;&lt;/P&gt;&lt;P&gt;The question is how far can you go in customizing the CRUD stored procedures to allow me to call something like the above.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Paul</description><pubDate>Tue, 15 Aug 2006 09:34:26 GMT</pubDate><dc:creator>Paul Gwynne</dc:creator></item><item><title>RE: Customise Stored Procedure Updates</title><link>http://forum.strataframe.net/FindPost2193.aspx</link><description>Yes, the ability to allow additional parameters to be passed to the executing stored procedures&amp;nbsp;is on our long term list of feature improvements.&amp;nbsp; By long term, I mean most likely it will be included with the .NET 3.0 release when we can support DLinq within StrataFrame.&amp;nbsp; &lt;/P&gt;&lt;P&gt;The easiest way to provide the functionality right now would be to create your own DbDataSourceItem implementation and when the UpdateRow method is called, raise an event that allows you to add the additional parameters to the command that is being executed.&amp;nbsp; You could even use the SqlDataSourceItem as a base class since you only need to override the UpdateRow method.</description><pubDate>Tue, 15 Aug 2006 09:34:26 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Customise Stored Procedure Updates</title><link>http://forum.strataframe.net/FindPost2192.aspx</link><description>Thanks for the reply. This might be an issue as we are doing a bit more than just pure auditing.Not having access to the source code, what about a suggested change for the next release where you provide the ability to decorate the SQLCommand object with additional parameters via a call to a custom decorating class which is written outside of the framework.&lt;/P&gt;&lt;P&gt;By this I mean &lt;BR&gt;1. Presistance of object is called.&lt;BR&gt;2. If saving via stored proc then do all of the work to prepare the proc with all the parameters you expect.&lt;BR&gt;3. Check if a custom interface/provider/decorator has been injected into the framework and call it to modify the SQLCommand object with additional parameters etc..&lt;BR&gt;4. Fire the SQLCommand object to save the data.&lt;/P&gt;&lt;P&gt;This then gives greater flexibility to us without compromising the framework.&lt;/P&gt;&lt;P&gt;Also if I buy the product.I see it says it comes with source code. To what extent could I modify the framework to allow such customisations. I can see it would not be a great idea given the amount of work you guys must have put in, but maybe that is another angle to look at.&lt;/P&gt;&lt;P&gt;Thanks</description><pubDate>Tue, 15 Aug 2006 09:25:11 GMT</pubDate><dc:creator>Paul Gwynne</dc:creator></item><item><title>RE: Customise Stored Procedure Updates</title><link>http://forum.strataframe.net/FindPost2191.aspx</link><description>You can customize the CRUD stored procedures to the extent of being able to choose the parameter prefix for the names, however, when a business object saves a record, it is expecting to be able to determine the parameters necessary for the UPDATE/INSERT from the fields within the business object.&amp;nbsp; We have no method you to pass extra parameters to a stored procedure.&lt;/P&gt;&lt;P&gt;We do have some functionality to support much of the information you're trying to save off through our security module, which supports built-in auditing for INSERTs/UPDATEs/DELETEs and application level events.&amp;nbsp; It stores of the information so you can see what user did what within the application.&amp;nbsp; Like I said, though, we don't have the functionality for you to pass the extra parameters into the stored procedures.&lt;/P&gt;&lt;P&gt;[quote]&lt;SPAN id=_ctl1__ctl0_ctlTopic__ctl0_ctlPanelBar_ctlTopicsRepeater__ctl1_lblFullMessage&gt;Apologies for putting this in the wrong forum section.&lt;/SPAN&gt;[/quote]&lt;/P&gt;&lt;P&gt;Awe, no problem.&amp;nbsp; I almost never check what section people post a question to; I just get an email letting me know that a new post exists :)</description><pubDate>Tue, 15 Aug 2006 08:30:04 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Customise Stored Procedure Updates</title><link>http://forum.strataframe.net/FindPost2190.aspx</link><description>Apologies for putting this in the wrong forum section.</description><pubDate>Tue, 15 Aug 2006 05:39:08 GMT</pubDate><dc:creator>Paul Gwynne</dc:creator></item></channel></rss>