<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Parameterized Stored Procedure call in PassthruRdbQuery</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Parameterized Stored Procedure call in PassthruRdbQuery</description>
  <pubDate>Wed, 10 Jun 2026 05:55:04 -700</pubDate>
  <lastBuildDate>Sat, 18 Sep 2010 04:47:50 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2162</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Parameterized Stored Procedure call in PassthruRdbQuery : Hi Kim,The placeholder was exactly...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8557#8557</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=444" rel="nofollow">toddb</a><br /><strong>Subject:</strong> 2162<br /><strong>Posted:</strong> 18-Sep-2010 at 4:47am<br /><br />Hi Kim,<div><br></div><div>The placeholder was exactly where I was going wrong...all starting to make a little more sense now.&nbsp;Thank you!</div><div><br></div><div>Kind regards,</div><div>Todd</div>]]>
   </description>
   <pubDate>Sat, 18 Sep 2010 04:47:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8557#8557</guid>
  </item> 
  <item>
   <title>Parameterized Stored Procedure call in PassthruRdbQuery : You can use the PassthruRdbQuery...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8550#8550</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2162<br /><strong>Posted:</strong> 17-Sep-2010 at 12:23pm<br /><br />You can use the PassthruRdbQuery in this way, although the parameter placeholder names in the ParameterizedSql need to be correct for the database provider.&nbsp; If you're using the OleDb provider then "?" is the correct placeholder.&nbsp; You can obtain the provider-specific name by calling rdbKey.AdoHelper.GetParameterPlaceHolderName(parm).<DIV>&nbsp;</DIV><DIV>You can instead use a StoredProcRdbQuery for this, which might be a bit simpler.&nbsp; You can create the query like this:</DIV><DIV>&nbsp;&nbsp; Dim query as New StoredProcRdbQuery("security", "GetNextAvailableId", yourdynamicType)</DIV><DIV>&nbsp;</DIV><DIV>and then add the parameters to the query.</DIV>]]>
   </description>
   <pubDate>Fri, 17 Sep 2010 12:23:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8550#8550</guid>
  </item> 
  <item>
   <title>Parameterized Stored Procedure call in PassthruRdbQuery : Hi David,I had seen that post...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8536#8536</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=444" rel="nofollow">toddb</a><br /><strong>Subject:</strong> 2162<br /><strong>Posted:</strong> 16-Sep-2010 at 3:40pm<br /><br />Hi David,<div><br></div><div>I had seen that post which appears to be the same as the Help documentation. Unfortunately it does not have an example of multiple parameters being passed through to a Stored Procedure which is where I think I am having problems.</div><div><br></div><div>Using SQL Server Profiler I can see it make the call to the database but I don't think it is actually passing the parameters. Should I be able to use a PassThruQuery in this way??</div><div><br></div><div>Kind regards,</div><div>Todd</div>]]>
   </description>
   <pubDate>Thu, 16 Sep 2010 15:40:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8536#8536</guid>
  </item> 
  <item>
   <title>Parameterized Stored Procedure call in PassthruRdbQuery : See this post:http://www.ideab...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8535#8535</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 2162<br /><strong>Posted:</strong> 16-Sep-2010 at 2:51pm<br /><br />See this post:<br><br>http://www.ideablade.com/forum/forum_posts.asp?TID=394&amp;title=parameterizedsql-in-passthrurdbquery<br><br><br>]]>
   </description>
   <pubDate>Thu, 16 Sep 2010 14:51:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8535#8535</guid>
  </item> 
  <item>
   <title>Parameterized Stored Procedure call in PassthruRdbQuery : Hi,Is it possible to call a Stored...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8525#8525</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=444" rel="nofollow">toddb</a><br /><strong>Subject:</strong> 2162<br /><strong>Posted:</strong> 16-Sep-2010 at 12:11am<br /><br />Hi,<div><br></div><div>Is it possible to call a Stored Procedure with multiple parameters via a PassthruRdbQuery?</div><div><br></div><div>A few lines extracted from my code are below:</div><div><br></div><div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim Parameters(2) As RdbParameter</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Parameters(0) = New RdbParameter("@ModelName", DbType.AnsiString)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Parameters(1) = New RdbParameter("@IDField", DbType.AnsiString)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Parameters(2) = New RdbParameter("@Method", DbType.Byte)</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Parameters(0).Value = pModelName</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Parameters(1).Value = pIdField</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Parameters(2).Value = 1</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim sql As New ParameterizedSql("EXEC &#091;Security&#093;.&#091;GetNextAvailableId&#093; @ModelName, @IDField, @Method", Parameters)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim query As New PassthruRdbQuery(PS.GetDynamicType("NextAvailableId"), sql)</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim el = PM.GetEntities(query)</div></div></div><div><br></div><div>When it makes the GetEntities call it fails with the following exception:</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>"Must declare the scalar variable "@ModelName"</div><div><br></div><div>Any help would be greatly appreciated.</div><div><br></div><div>Thanks,</div><div>Todd</div>]]>
   </description>
   <pubDate>Thu, 16 Sep 2010 00:11:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2162&amp;PID=8525#8525</guid>
  </item> 
 </channel>
</rss>