﻿<?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?)  » Fill method to select all records where fk value not in a list of integers passed in</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 16 Sep 2026 00:49:56 GMT</lastBuildDate><ttl>20</ttl><item><title>Fill method to select all records where fk value not in a list of integers passed in</title><link>http://forum.strataframe.net/FindPost24518.aspx</link><description>Actually, I want to fill a checkedlistbox which is getting its data directly from a fill method in the TemplatesBO.&lt;br&gt;
&lt;br&gt;
Currently it is just doing a fillall() &lt;br&gt;
&lt;br&gt;
(though I'd still like to know a how to of the previous BO / BO question )&lt;br&gt;
&lt;br&gt;
Now, I have a PDFsBO that just represents selected records (same scenario as first question)&lt;br&gt;
&lt;br&gt;
Now I want to write a fill method to fill the second checked listbox "Templates" so that no item comes from a record that has a pk matching an itemplateskey found in PDFsBO&lt;br&gt;
&lt;br&gt;
I assume I need to pass in a list (or array?) of itemplateskeys found in pdfsBO.&lt;br&gt;
&lt;br&gt;
But what is the "Select " statement for the fill that will select only records "where ikey not in (select itemplateskey from parameterarray)")&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;</description><pubDate>Mon, 07 Sep 2009 11:16:24 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Fill method to select all records where fk value not in a list of integers passed in</title><link>http://forum.strataframe.net/FindPost24558.aspx</link><description>[quote]Is the size of the run-time an issue? [/quote]&lt;/P&gt;&lt;P&gt;Not unless you have download or install limitations.&amp;nbsp; In most environments this should not be an issue.</description><pubDate>Mon, 07 Sep 2009 11:16:24 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Fill method to select all records where fk value not in a list of integers passed in</title><link>http://forum.strataframe.net/FindPost24540.aspx</link><description>Thanks Eddy&lt;br&gt;
&lt;br&gt;
I'm specing everything against 3.5 and SQL 2008.  No reason to be backward compatible with anything.&lt;br&gt;
&lt;br&gt;
Is the size of the run-time an issue?</description><pubDate>Fri, 04 Sep 2009 16:24:11 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Fill method to select all records where fk value not in a list of integers passed in</title><link>http://forum.strataframe.net/FindPost24539.aspx</link><description>Hi Charles,&lt;br&gt;
&lt;br&gt;
Be aware that LINQ requires .NET 3.0 or 3.5, and there is a size difference between .NET 2.0 runtime and the newest one.</description><pubDate>Fri, 04 Sep 2009 16:02:45 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Fill method to select all records where fk value not in a list of integers passed in</title><link>http://forum.strataframe.net/FindPost24535.aspx</link><description>It does indeed and that is the direction I was headed before I heard the siren song of LINQ.  I am going to mess with both approaches, as I'm sure each will come in handy at one time or another.  &lt;br&gt;
&lt;br&gt;
By Tuesday I may have LINQ chops to show you :)  (ordered a couple of books as I can see where LINQ to objects can be kind of cool.  Beth Massey has a couple of nice aggregation examples on her blog)</description><pubDate>Fri, 04 Sep 2009 13:36:49 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Fill method to select all records where fk value not in a list of integers passed in</title><link>http://forum.strataframe.net/FindPost24534.aspx</link><description>The brute force way is to build a list of PKs from the checked listbox that you then use in a select query.&lt;br&gt;
&lt;br&gt;
[codesnippet]'-- Build list of selected generated PDFs by&lt;br&gt;
'&amp;nbsp;&amp;nbsp;&amp;nbsp;looping through selected items in checked list box&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
'-- Build Select&lt;br&gt;
Dim selectSql = "Select * From Templates Where TemplateID Not In(" &amp; selectedPks &amp; ")"&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
Likely, you'd generate the list of selected PKs in the form and pass that list to a Fill method in the BO.&lt;br&gt;
&lt;br&gt;
Hope that makes sense...</description><pubDate>Fri, 04 Sep 2009 12:13:53 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>