﻿<?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 / Business Objects and Data Access (How do I?)  / Parameters collection for FillByStoredProcedure / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Tue, 07 Oct 2008 09:13:44 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Parameters collection for FillByStoredProcedure</title><link>http://forum.strataframe.net/Topic15966-6-1.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/Topic15966-6-1.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.  It's a good thing to set the DataSourceKey on the BO, too.  :D  It tends to misbehave when that is missing.  Once I put that back in, then both your code and my code works just fine.  Sorry for the oversight.  :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/Topic15966-6-1.aspx</link><description>You have to supply a DbParameter.  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/Topic15966-6-1.aspx</link><description>One of the data retrieval methods is MicroFour.StrataFrame.Business.BusinessLayer.FillByStoredProcedure(string, params System.Data.Common.DbParameter[]).  How do I pass a parameters collection?  Sorry, if I am not making myself clear.  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;     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/Topic15966-6-1.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><item><title>Parameters collection for FillByStoredProcedure</title><link>http://forum.strataframe.net/Topic15966-6-1.aspx</link><description>How do I pass multiple parameters to the FillByStoredProcedure method?</description><pubDate>Mon, 28 Apr 2008 16:13:37 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item></channel></rss>