﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » Enterprise Server - V1 » Issues  » Parameterized Store Procedures Failing</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 10 Jun 2026 17:51:46 GMT</lastBuildDate><ttl>20</ttl><item><title>Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost25649.aspx</link><description>Hi SF Team,&lt;P&gt;I have just setup ES on a server and I began to do some testing.&amp;nbsp; The code (below) has been running for a couple of years on a local production server with a SQLExpress database, but&amp;nbsp;when this same&amp;nbsp;code (below) runs connecting through ES, I am getting an error (see below).&amp;nbsp; This piece of code is&amp;nbsp;using a BO to run a parameterized stored procedure.&amp;nbsp; I am getting the same error when running other BOs using parameterized stored procredures.&amp;nbsp; It seems this error is associated with the BO.FillByStoredProcedure method.&amp;nbsp;&amp;nbsp; What is going on?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; FillByCallBackTop1ByCampaignIDAndUserIDAndDateRange(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; campaignID &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Integer&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; userID &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Integer&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;, _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; startDate &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Date&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; endDate &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Date&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; campaignMaximumCallTries &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Integer&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; parms(4) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SqlParameter&lt;/P&gt;&lt;P&gt;parms(0) = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SqlParameter(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"@CampaignID"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, SqlDbType.Int)&lt;/P&gt;&lt;P&gt;parms(0).Value = campaignID&lt;/P&gt;&lt;P&gt;parms(1) = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SqlParameter(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"@UserID"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, SqlDbType.Int)&lt;/P&gt;&lt;P&gt;parms(1).Value = userID&lt;/P&gt;&lt;P&gt;parms(2) = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SqlParameter(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"@StartDate"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, SqlDbType.SmallDateTime)&lt;/P&gt;&lt;P&gt;parms(2).Value = startDate&lt;/P&gt;&lt;P&gt;parms(3) = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SqlParameter(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"@EndDate"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, SqlDbType.SmallDateTime)&lt;/P&gt;&lt;P&gt;parms(3).Value = endDate&lt;/P&gt;&lt;P&gt;parms(4) = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SqlParameter(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"@CampaignMaximumCallTries"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, SqlDbType.SmallInt)&lt;/P&gt;&lt;P&gt;parms(4).Value = campaignMaximumCallTries&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.FillByStoredProcedure(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"CampaignContactsView_CallBack_Top_ByCampaignIDUserIDStartEndDate_Select"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, parms)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;=========================================================================================&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;&lt;FONT face=Arial size=2&gt;&lt;P&gt;Exception (EnterpriseDataSourceException)&lt;/P&gt;&lt;P&gt;Message = "An error occurred while executing the command on the remote data source. See the inner exception for more details."&lt;/P&gt;&lt;P&gt;InnerException (SqlException): Source=".Net SqlClient Data Provider"; Target=null; Tag=null; Class=16; LineNumber=0; Number=201; Server="TESTSERVER\SQLEXPRESS"; State=4; ErrorCode=-2146232060; &lt;/P&gt;&lt;P&gt;Message = "Procedure or Function 'CampaignContactsView_CallBack_Top1_ByCampaignIDUserIDStartEndDate_Select' expects parameter '@CampaignID', which was not supplied."&lt;/P&gt;&lt;P&gt;StackTrace = &lt;/P&gt;&lt;P&gt;" at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.SqlDataReader.get_MetaData()&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior ... (truncated) ...xecuteReader(CommandBehavior behavior, String method)&lt;/P&gt;&lt;P&gt;at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)&lt;/P&gt;&lt;P&gt;at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)&lt;/P&gt;&lt;P&gt;at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)&lt;/P&gt;&lt;P&gt;at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)&lt;/P&gt;&lt;P&gt;at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)&lt;/P&gt;&lt;P&gt;at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)&lt;/P&gt;&lt;P&gt;at MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)&lt;/P&gt;&lt;P&gt;at MicroFour.StrataFrame.Data.Enterprise.RequestProcessor.ExecuteDataTable(ExecuteDataTableParams params)"&lt;/P&gt;&lt;P&gt;Errors (SqlErrorCollection): Count=1; &lt;/P&gt;&lt;P&gt;#0 = {System.Data.SqlClient.SqlError: Procedure or Function 'CampaignContactsView_CallBack_Top1_ByCampaignIDUserIDStartEndDate_Select' expects parameter '@CampaignID', which was not supplied.}&lt;/P&gt;&lt;P&gt;Procedure = "CampaignContactsView_CallBack_Top1_ByCampaignIDUserIDStartEndDate_Select"&lt;/P&gt;&lt;P&gt;Environment: ThreadIdentity="" DateTime=["2010-01-29 07:53:48.537"] ThreadName=null WindowsIdentity="STRUSS\JPagley" ThreadId="10" DomainName="ProspectHelper.vshost.exe" OSVersion=["Microsoft Windows NT 5.1.2600 Service Pack 3"]&lt;/P&gt;&lt;P&gt;MachineName="1LPJPAGLEY" UserName="JPagley"&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Sun, 14 Feb 2010 13:08:55 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost26023.aspx</link><description>In short, ExecuteScalar is a direct shot to the data execution of the data layer with no other interpretation.&amp;nbsp; The SQL command is handed off and handled as is by the data layer whereas there is some interpretted logic in the ExecuteStoredProcedure (which is generally intended for more simple SPROCS). Generally speaking, I always use the ExecuteScalar, ExecuteNonQuery, etc. anytime that I want to execute a SPROC anyway as it is actually slightly better on the performance side of things.&amp;nbsp; At any rate, I am glad that you got it going.</description><pubDate>Sun, 14 Feb 2010 13:08:55 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost26022.aspx</link><description>Works fine when using ExecuteScalar as you posted Trent. I am not too concerned with the philosophy, but if you feel like giving a brief explanation of why one works and the other doesnt.... or why ExecuteScalar&lt;STRONG&gt; should&lt;/STRONG&gt; be used over the other I'll take it. If not, I'm just happy to have something that works because I had this issue in quite a few places with after moving this app to ES.&lt;/P&gt;&lt;P&gt;Thanks as always.&lt;/P&gt;&lt;P&gt;Greg, your right it didnt end up being the problem but OUTPUT is propably technically the right return type to use, I knew it was always going to be a single integer return value so I felt ok using a return value. I may indeed refactor, thanks for the input.</description><pubDate>Sun, 14 Feb 2010 10:09:45 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost26010.aspx</link><description>Keith,&lt;br&gt;
&lt;br&gt;
Do you get the same error when using the ExecuteScalar instead of the ExecuteStoredProcecdure?&lt;br&gt;
&lt;br&gt;
[codesnippet]Dim cmd As New SqlCommand("dbo.GetNextWingForAcademy")&lt;br&gt;
Dim retval As New SqlClient.SqlParameter()&lt;br&gt;
&lt;br&gt;
'-- Set the command type&lt;br&gt;
cmd.CommandType = SqlCommandType.StoredProcedure&lt;br&gt;
&lt;br&gt;
retval.ParameterName = "@nextwing"&lt;br&gt;
retval.Direction = ParameterDirection.ReturnValue&lt;br&gt;
&lt;br&gt;
cmd.Parameters.Add(New SqlClient.SqlParameter("@acadpk", p_acadpk))&lt;br&gt;
cmd.Parameters.Add(retval)&lt;br&gt;
&lt;br&gt;
MicroFour.StrataFrame.Data.DataBasics.DataSources("").ExecuteScalar(cmd)&lt;br&gt;
&lt;br&gt;
If Not retval.Value Is Nothing Then&lt;br&gt;
&lt;br&gt;
r_nextwing = retval.Value&lt;br&gt;
&lt;br&gt;
End If[/codesnippet]&lt;br&gt;
&lt;br&gt;
I didn't run this code, but it should be close.  Try running ExecuteScalar to see if you have any different results.  This should work.  We can discuss philosophy on this later, but let's start from here and we can see where we are.</description><pubDate>Sat, 13 Feb 2010 09:14:21 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost26009.aspx</link><description>Hi Keith,&lt;P&gt;I have never used the ExecuteStoredProcedure command.&amp;nbsp;&amp;nbsp; The one thing I see in common with both of our&amp;nbsp;issues&amp;nbsp;is the use of the SqlParameter object.&amp;nbsp; When I&amp;nbsp;refactored my code to use the SQLCommand object&amp;nbsp;and eliminated the use of the SqlParameter object,&amp;nbsp;it fixed the problem for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;Jeff</description><pubDate>Sat, 13 Feb 2010 08:59:10 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost26008.aspx</link><description>Likely, this isn't it, but your sproc defines just one parameter right? @acadpk?  I'm asking because it is more usual to use an OUTPUT parameter rather than the return value.</description><pubDate>Sat, 13 Feb 2010 08:57:50 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost26005.aspx</link><description>I get a very similar error, code works fine when not using ES. I am using SF method &lt;FONT size=2&gt;ExecuteStoredProcedure &lt;/FONT&gt;to call the Sproc. The SPROC returns a single value that I capture by setting the parameter.direction = ParameterDirection.ReturnValue. How do I make this work using ES?&lt;P&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;BusinessLayerException&lt;BR&gt;&amp;nbsp; An error occurred while saving an the data to the server.&lt;BR&gt;EnterpriseDataSourceException&lt;BR&gt;&amp;nbsp; An error occurred while executing the command on the remote data source.&amp;nbsp; See the inner exception for more details.&lt;BR&gt;SqlException&lt;BR&gt;&amp;nbsp; Procedure or function 'GetNextWingForAcademy' expects parameter &lt;A href="mailto:'@acadpk'"&gt;'@acadpk'&lt;/A&gt;, which was not supplied.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MicroFour StrataFrame Business&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Calling Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; retval &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; SqlClient.SqlParameter()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;retval.ParameterName = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"@nextwing"&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;retval.Direction = ParameterDirection.ReturnValue&lt;/P&gt;&lt;P&gt;MicroFour.StrataFrame.Data.DataBasics.DataSources(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;).ExecuteStoredProcedure(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"GetNextWingForAcademy"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, _&lt;/P&gt;&lt;P&gt;DbCommandExecutionType.ExecuteScalar, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SqlClient.SqlParameter(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"@acadpk"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, p_acadpk), retval)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; retval.Value &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Is&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Nothing&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;r_nextwing = retval.Value&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Sat, 13 Feb 2010 00:26:36 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost25659.aspx</link><description>Thanks, Edhy!  Glad you got it going, Jeff! :)</description><pubDate>Sat, 30 Jan 2010 09:28:50 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost25653.aspx</link><description>Hi Jeff,&lt;br&gt;
&lt;br&gt;
Glad it worked for you.  For now I don't have the need for ES, but it is something that I may start using real soon.</description><pubDate>Fri, 29 Jan 2010 10:32:06 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost25652.aspx</link><description>Hi Edhy,&lt;P&gt;Yeh..that worked and it was easy &lt;IMG title=W00t src="http://forum.strataframe.net/Skins/Classic/Images/MessageIcons/W00t.gif" align=absMiddle&gt;&amp;nbsp; I guess I was doing it the hard way. &lt;IMG title=Crazy src="http://forum.strataframe.net/Skins/Classic/Images/MessageIcons/Crazy.gif" align=absMiddle&gt;&lt;/P&gt;&lt;P&gt;I going to have to go back and refactor my code.&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;&lt;P&gt;Jeff</description><pubDate>Fri, 29 Jan 2010 10:29:27 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost25651.aspx</link><description>Hi Edhy,&lt;/P&gt;&lt;P&gt;That is a very easy code change to make.&amp;nbsp; I going to make the change and then test it.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jeff</description><pubDate>Fri, 29 Jan 2010 10:12:41 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Parameterized Store Procedures Failing</title><link>http://forum.strataframe.net/FindPost25650.aspx</link><description>Hi Jeff,&lt;br&gt;
&lt;br&gt;
I have not used the ES or the method FillByStoredProcedure, here is how I fill the BO using store procedure:&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
Using cmd As New SqlCommand()&lt;br&gt;
            cmd.CommandType = CommandType.StoredProcedure&lt;br&gt;
            cmd.CommandText = "dbo.sp_FU_CheckDuplicateInvoice_FileName"&lt;br&gt;
&lt;br&gt;
            '-- Create and set the parameters&lt;br&gt;
            cmd.Parameters.AddWithValue("@TransactionType", Enumerations.TransactionType.FirstUseImport).SqlDbType = SqlDbType.SmallInt&lt;br&gt;
            cmd.Parameters.AddWithValue("@PK_Transaction", pPK_Transaction).SqlDbType = SqlDbType.Int&lt;br&gt;
            cmd.Parameters.AddWithValue("@FU_CarrierInvoiceNo", pCarrierInvoice_FileName).SqlDbType = SqlDbType.VarChar&lt;br&gt;
            cmd.Parameters.AddWithValue("@FU_ImportFileName", pCarrierInvoice_FileName).SqlDbType = SqlDbType.VarChar&lt;br&gt;
            cmd.Parameters.AddWithValue("@SearchByInvoice", pSearchByInvoice).SqlDbType = SqlDbType.Bit&lt;br&gt;
&lt;br&gt;
            '-- Execute the query &lt;br&gt;
            Me.FillDataTable(cmd)&lt;br&gt;
        End Using&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
Probable there is a problem with the FillByStoredProcedure but with above code I have never got any problem.  Hope it can help you.</description><pubDate>Fri, 29 Jan 2010 09:53:18 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>