﻿<?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?)  » Parameters collection for FillByStoredProcedure</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 04:15:01 GMT</lastBuildDate><ttl>20</ttl><item><title>Parameters collection for FillByStoredProcedure</title><link>http://forum.strataframe.net/FindPost15966.aspx</link><description>How do I pass multiple parameters to the FillByStoredProcedure method?</description><pubDate>Mon, 28 Apr 2008 17:44:01 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Parameters collection for FillByStoredProcedure</title><link>http://forum.strataframe.net/FindPost15971.aspx</link><description>No problem...glad you got it going :)</description><pubDate>Mon, 28 Apr 2008 17:44:01 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Parameters collection for FillByStoredProcedure</title><link>http://forum.strataframe.net/FindPost15970.aspx</link><description>I did try this once:&lt;/P&gt;&lt;FONT color=#2b91af size=2&gt;&lt;P&gt;SqlParameter&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; mPLType = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@pltype"&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;, pPLType);&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; mOrderIndex = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SqlParameter&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@orderindex"&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;, pOrderIndex);&lt;BR&gt;&lt;/FONT&gt;FillByStoredProcedure(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"spx_GetOrderItemList"&lt;/FONT&gt;&lt;FONT size=2&gt;, mPLType, mOrderIndex);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;It did not work...well, I didn't think it did.&amp;nbsp; It's a good thing to set the DataSourceKey on the BO, too.&amp;nbsp; :D&amp;nbsp; It tends to misbehave when that is missing.&amp;nbsp; Once I put that back in, then both your code and my code works just fine.&amp;nbsp; Sorry for the oversight.&amp;nbsp; :blush:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Thanks for helping!&lt;BR&gt;Bill&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Mon, 28 Apr 2008 17:21:56 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Parameters collection for FillByStoredProcedure</title><link>http://forum.strataframe.net/FindPost15969.aspx</link><description>You have to supply a DbParameter.&amp;nbsp; If you are using SQL Server, then it would look something like this:&lt;/P&gt;&lt;P&gt;[codesnippet]Me.FillByStoredProcedure("MyStoredSproc", New SqlParameter("@parm1", MyValue), New SqlParameter("@parm2", MySecondValue))[/codesnippet]</description><pubDate>Mon, 28 Apr 2008 17:11:59 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Parameters collection for FillByStoredProcedure</title><link>http://forum.strataframe.net/FindPost15968.aspx</link><description>One of the data retrieval methods is MicroFour.StrataFrame.Business.BusinessLayer.FillByStoredProcedure(string, params System.Data.Common.DbParameter[]).&amp;nbsp; How do I pass a parameters collection?&amp;nbsp; Sorry, if I am not making myself clear.&amp;nbsp; Here is the code offending code in my BO:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;public&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; FillByOrderIndex(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; pPLType, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; pOrderIndex)&lt;BR&gt;&lt;/FONT&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FillByStoredProcedure(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"spx_GetOrderItemList"&lt;/FONT&gt;&lt;FONT size=2&gt;, pPLType, pOrderIndex);&lt;BR&gt;}&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Mon, 28 Apr 2008 17:06:18 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Parameters collection for FillByStoredProcedure</title><link>http://forum.strataframe.net/FindPost15967.aspx</link><description>It is a ParamArray so you can just pass as many parms as you want or create an Object array....whichever works best for you:&lt;/P&gt;&lt;P&gt;[codesnippet]MyBo.FillByStoredProcedure(Parm1, Parm2, Parm3)[/codesnippet]&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;[codesnippet]MyBo.FillByStoredProcedure(New Object() {Parm1, Parm2, Parm3))[/codesnippet]</description><pubDate>Mon, 28 Apr 2008 16:56:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>