Customise Stored Procedure Updates


Author
Message
Paul Gwynne
Paul Gwynne
StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)
Group: Forum Members
Posts: 3, Visits: 10
Hi,

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.

In essence the parameters look something like this

create procedure dbo.smEXPSMASTER_ACD
     @I_ACTION  char(1) ='',
     @I_IDKEY  IDKey =0,
     @I_TSTAMP  timestamp =null,
     -- Input Data Fields
     @I_USERCODE   UserCode  = '',
     @I_NAME    varchar(35)  = '',
     @I_NOMCODE   UserCode  = '',
     -- Update Flags
     @I_UPD_USERCODE   bit  = 0,
     @I_UPD_NAME   bit  = 0,
     @I_UPD_NOMCODE   bit  = 0,
     -- Original Values
     @I_ORG_USERCODE   UserCode  = '',
     @I_ORG_NAME    varchar(35)  = '',
     @I_ORG_NOMCODE   UserCode  = '',
     -- Progress Parameters
     @I_PROG_SPID  int  =0,
     -- Session Parameters
     @I_SESS_USERID  IDKey  =0,
     @I_SESS_USERNAME UserCode ='',
     -- Audit Parameters
     @I_NOAUDIT_LOG  bit  =0,
     @I_AUDIT_MESG  varchar(255) ='',
     @I_AUDIT_SOURCE  varchar(1) ='L',
     -- Output Parameters
     @O_IDKEY  int  =0 output,
     @O_ERROR_TABLE  varchar(30) ='' output,
     @O_ERROR_USERCODE UserCode ='' output,
     @O_RETURN  int  =0 output,
     @O_MESG   varchar(100) = '' output

The question is how far can you go in customizing the CRUD stored procedures to allow me to call something like the above.

Thanks

Paul

Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, the ability to allow additional parameters to be passed to the executing stored procedures is on our long term list of feature improvements.  By long term, I mean most likely it will be included with the .NET 3.0 release when we can support DLinq within StrataFrame. 

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.  You could even use the SqlDataSourceItem as a base class since you only need to override the UpdateRow method.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search