﻿<?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?)  » Error populating a listview...</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 09:38:03 GMT</lastBuildDate><ttl>20</ttl><item><title>Error populating a listview...</title><link>http://forum.strataframe.net/FindPost1950.aspx</link><description>When trying to fill a Listview with a BO i get the following error:&lt;br&gt;
&lt;br&gt;
[quote]Dynamically populating the ListView failed. Could not create and fill the business object of type 'STI.InventoryBO'. [/quote]&lt;br&gt;
&lt;br&gt;
I setup everything correctly, i think, not sure why I'm getting this error.&lt;br&gt;
&lt;br&gt;
Any ideas?</description><pubDate>Wed, 26 Jul 2006 15:03:06 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Error populating a listview...</title><link>http://forum.strataframe.net/FindPost1957.aspx</link><description>That's what we're here for! ;)</description><pubDate>Wed, 26 Jul 2006 15:03:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error populating a listview...</title><link>http://forum.strataframe.net/FindPost1955.aspx</link><description>Thaks for the tip! I can ALWAYS use those!</description><pubDate>Wed, 26 Jul 2006 15:01:14 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Error populating a listview...</title><link>http://forum.strataframe.net/FindPost1953.aspx</link><description>It has to do with strong-typing.&amp;nbsp; Your method has a parameter defined as a System.Int32.&amp;nbsp; Any controls "Text" property is defined as a System.String.&amp;nbsp; By passing just the Control.Text, you are passing a string typed value and the method expects integer.&amp;nbsp; When you added the CInt(), it converted the text to Integer as the method was expecting.&amp;nbsp; .NET is a strong-typed development environment.&amp;nbsp; You cannot rely on automatic data conversions like other languages such as Visual FoxPro.&amp;nbsp; This is actually a VERY good thing.&amp;nbsp; You learn about type conversions either a compile time or very quickly when an app is run.&amp;nbsp; So most of the "Data Type Mistmatch" error from the old days are gone.&lt;P&gt;Just FYI, I would not use CInt().&amp;nbsp; It is very slow and is an obselete method.&amp;nbsp; You should do most of your type conversions like this:&lt;/P&gt;&lt;P&gt;CType(Control.Text, System.Integer)</description><pubDate>Wed, 26 Jul 2006 14:59:26 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error populating a listview...</title><link>http://forum.strataframe.net/FindPost1952.aspx</link><description>I did that. I fixed it.  Not sure why this works. I'm sure you can explain it to me. :P&lt;br&gt;
&lt;br&gt;
This is what I had when it wasnt working...&lt;br&gt;
[code]e.Parameters(0).Value = Me.txtPOID.Text[/code]&lt;br&gt;
&lt;br&gt;
I changed it to this and it worked.&lt;br&gt;
[code]e.Parameters(0).Value = Cint(Me.txtPOID.Text)[/code]&lt;br&gt;
&lt;br&gt;
Can you enlighten me as to why that conversion made a difference?&lt;br&gt;</description><pubDate>Wed, 26 Jul 2006 14:55:14 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Error populating a listview...</title><link>http://forum.strataframe.net/FindPost1951.aspx</link><description>Does the method you selected require parameters?&amp;nbsp; If so you need to set those parameters in the ListPopulating event of the list.&amp;nbsp; There will be an event argument like this:&lt;/P&gt;&lt;P&gt;e.Parameters(0).Value = 1&lt;BR&gt;e.Parameters(1).Value = "Second Parm"</description><pubDate>Wed, 26 Jul 2006 14:51:49 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>