﻿<?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 » Business Objects and Data Access (How do I?)  » Saving Data via Stored Procedures</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 13:47:14 GMT</lastBuildDate><ttl>20</ttl><item><title>Saving Data via Stored Procedures</title><link>http://forum.strataframe.net/FindPost437.aspx</link><description>Hi All&lt;/P&gt;&lt;P&gt;Do you have any samples or documentation on using sprocs to do data manipulation through a business object? &lt;/P&gt;&lt;P&gt;I'm&amp;nbsp;using a sproc to fill the datatable and I see options in the business objects for DeleteUsingStoredProceure / DeleteStoredProcedureName etc but I'm not sure how these work. &lt;/P&gt;&lt;P&gt;I've not had a chance to test this but I'm assuming that I'll need to leave dbWriter permissions open to the tables if I'm going to allow the BO to do the data manipulation. Is this correct?&lt;/P&gt;&lt;P&gt;Thanks much&lt;/P&gt;&lt;P&gt;Clay</description><pubDate>Wed, 18 Jan 2006 08:43:48 GMT</pubDate><dc:creator>Clayton Hoyt</dc:creator></item><item><title>RE: Saving Data via Stored Procedures</title><link>http://forum.strataframe.net/FindPost447.aspx</link><description>[quote]I will need to have the parameters mirror the fields in the table both in order and type[/quote]&lt;br&gt;
&lt;br&gt;
Just name and type... the order is irrelavent.  On the parameter names, you can add any prefix to the field name you like.  For instance, if your primary key field is UserID, then you can set your parameter name to @p_UserID or just @UserID.  Just set the StoredProcedureParameterNamePrefix property to the correct value...</description><pubDate>Wed, 18 Jan 2006 08:43:48 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Saving Data via Stored Procedures</title><link>http://forum.strataframe.net/FindPost444.aspx</link><description>Thanks much...&lt;/P&gt;&lt;P&gt;So for example, when I create an Insert or Update sproc,&amp;nbsp;I will need to have the parameters mirror the fields in the table both in order and type.&amp;nbsp; From there, will the BO take care of the rest?</description><pubDate>Tue, 17 Jan 2006 17:10:16 GMT</pubDate><dc:creator>Clayton Hoyt</dc:creator></item><item><title>RE: Saving Data via Stored Procedures</title><link>http://forum.strataframe.net/FindPost440.aspx</link><description>Clay,&lt;br&gt;
&lt;br&gt;
Yes, I'm actually writing the documentation on the C.R.U.D. setting right now... how ironic.  Yes, whatever login you use to connect to the SQL Server will have to have write permissions on the database to be able to save the records.  &lt;br&gt;
&lt;br&gt;
I've attached the script file I use to create the stored procedures for our unit testing.  Basically, you just have to follow these rules:&lt;br&gt;
&lt;br&gt;
1).  The UPDATE and DELETE stored procedures need to use the same concurrency type as the business object is set to.&lt;br&gt;
a).  If you're using row versioning or timestamp, you need to pass accept the row version or timestamp column and check the value.&lt;br&gt;
2).  Any output value (new row version value, assigned identity value, etc.) needs to be returned through an output parameter.&lt;br&gt;
3).  Use the field names for the parameters with a common prefix.  The StoredProcedureParameterPrefix property allows you to set the prefix that you want to use (defaults to just '@').&lt;br&gt;
&lt;br&gt;
Just take a look at these stored procedures and I'm sure you'll get the idea of what you'll need to do. (Until I get you the new CHM with examples :))</description><pubDate>Tue, 17 Jan 2006 16:24:37 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>