<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Developer&#039;s Notes</title>
	<atom:link href="http://kirylkavalenka.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kirylkavalenka.wordpress.com</link>
	<description>Kiryl Kavalenka&#039;s Blog</description>
	<lastBuildDate>Mon, 16 Nov 2009 08:14:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kirylkavalenka.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Developer&#039;s Notes</title>
		<link>http://kirylkavalenka.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kirylkavalenka.wordpress.com/osd.xml" title="Developer&#039;s Notes" />
	<atom:link rel='hub' href='http://kirylkavalenka.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Allow Early Termination + Early Terminate Optional Fields</title>
		<link>http://kirylkavalenka.wordpress.com/2009/11/06/allow-early-termination-early-terminate-optional-fields/</link>
		<comments>http://kirylkavalenka.wordpress.com/2009/11/06/allow-early-termination-early-terminate-optional-fields/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 00:01:36 +0000</pubDate>
		<dc:creator>kirylkavalenka</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BizTalk 2006 R2]]></category>
		<category><![CDATA[Flat File]]></category>
		<category><![CDATA[Positional Schema]]></category>

		<guid isPermaLink="false">http://kirylkavalenka.wordpress.com/?p=19</guid>
		<description><![CDATA[About how the combination of "Allow Early Termination" and "Early Terminate Optional Fields" schema property settings affects parsing positional flat files.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kirylkavalenka.wordpress.com&amp;blog=10264931&amp;post=19&amp;subd=kirylkavalenka&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just run a test on how the combination of &#8220;Allow Early Termination&#8221; and &#8220;Early Terminate Optional Fields&#8221; affects parsing positional flat files. The reason for this is that I&#8217;m currently working on a BizTalk integration system which requires accepting all kinds of not-so-nicely-formatted flat files.</p>
<p>In order to simplify things let us assume the following format of the positional flat file:<br />
<strong>AAABBBCCC;</strong><br />
where records are delimited with <strong>&#8220;;&#8221; </strong>and each record is supposed to have 3 fields 3 characters long. Second and third fields are optional.</p>
<p>Here are the test results (all of the instance files included in the test are required to be accepted by the schema):</p>
<div class="Section1">
<table class="MsoTableMediumGrid3Accent3" style="border-collapse:collapse;border:none;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background:#9bbb59 none repeat scroll 0 0;width:20.9pt;padding:0 5.4pt;" rowspan="2" width="28" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;"><strong><span style="color:white;"> </span></strong></p>
</td>
<td style="background:#9bbb59 none repeat scroll 0 0;width:218.5pt;padding:0 5.4pt;" width="291" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><strong><span style="color:white;">Allow Early Termination +</span></strong></p>
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><strong><span style="color:white;">Early Terminate Optional<br />
Fields</span></strong></p>
</td>
<td style="background:#9bbb59 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><strong><span style="color:white;">Yes + Yes</span></strong></p>
</td>
<td style="background:#9bbb59 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><strong><span style="color:white;">Yes + No</span></strong></p>
</td>
<td style="background:#9bbb59 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><strong><span style="color:white;">No + N/A</span></strong></p>
</td>
</tr>
<tr>
<td style="background:#cdddac none repeat scroll 0 0;width:218.5pt;padding:0 5.4pt;" width="291" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><strong>Flat File Instance:</strong></p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:359.1pt;padding:0 5.4pt;" colspan="3" width="479" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">
</td>
</tr>
<tr>
<td style="background:#9bbb59 none repeat scroll 0 0;width:20.9pt;padding:0 5.4pt;" width="28" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;"><strong><span style="color:white;">1</span></strong></p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:218.5pt;padding:0 5.4pt;" width="291" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;">AAABBBCCC;</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
</tr>
<tr>
<td style="background:#9bbb59 none repeat scroll 0 0;width:20.9pt;padding:0 5.4pt;" width="28" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;"><strong><span style="color:white;">2</span></strong></p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:218.5pt;padding:0 5.4pt;" width="291" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;">AAABBBC;</p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><span style="color:red;">FAIL</span></p>
</td>
</tr>
<tr>
<td style="background:#9bbb59 none repeat scroll 0 0;width:20.9pt;padding:0 5.4pt;" width="28" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;"><strong><span style="color:white;">3</span></strong></p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:218.5pt;padding:0 5.4pt;" width="291" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;">AAABBB;</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
</tr>
<tr>
<td style="background:#9bbb59 none repeat scroll 0 0;width:20.9pt;padding:0 5.4pt;" width="28" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;"><strong><span style="color:white;">4</span></strong></p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:218.5pt;padding:0 5.4pt;" width="291" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;">AAAB;</p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><span style="color:red;">FAIL</span></p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><span style="color:red;">FAIL</span></p>
</td>
</tr>
<tr>
<td style="background:#9bbb59 none repeat scroll 0 0;width:20.9pt;padding:0 5.4pt;" width="28" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;"><strong><span style="color:white;">5</span></strong></p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:218.5pt;padding:0 5.4pt;" width="291" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;">AAA;</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#e6eed5 none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
</tr>
<tr>
<td style="background:#9bbb59 none repeat scroll 0 0;width:20.9pt;padding:0 5.4pt;" width="28" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;"><strong><span style="color:white;">6</span></strong></p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:218.5pt;padding:0 5.4pt;" width="291" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;line-height:normal;">AAABBBCCCDDD;</p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><span style="color:red;">FAIL</span></p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;">PARSED</p>
</td>
<td style="background:#cdddac none repeat scroll 0 0;width:119.7pt;padding:0 5.4pt;" width="160" valign="top">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:normal;"><span style="color:red;">FAIL</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">Note: The value of &#8220;Early Terminate Optional Fields&#8221; is only taken into account when &#8220;Allow Early Termination&#8221; is set to &#8220;Yes&#8221;.</p>
<p class="MsoNormal">So, the setting of &#8220;Yes + Yes&#8221; looks the best for my requirements with the exception of case 6 when there is rubbish after the last record. In most of the real world scenarios this case need to be failed anyway because it simply does not comply with the record format. But in my case the system occasionally received otherwise valid files with a space at the end of each record (i.e. &#8220;DDD&#8221; = &#8221; &#8221; in my case). To solve this particular problem I have increased the <em>Positional Length</em> property of the last field from 3 characters to 6, effectively transforming case 6 into case 1 in my initial test.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kirylkavalenka.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kirylkavalenka.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kirylkavalenka.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kirylkavalenka.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kirylkavalenka.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kirylkavalenka.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kirylkavalenka.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kirylkavalenka.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kirylkavalenka.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kirylkavalenka.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kirylkavalenka.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kirylkavalenka.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kirylkavalenka.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kirylkavalenka.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kirylkavalenka.wordpress.com&amp;blog=10264931&amp;post=19&amp;subd=kirylkavalenka&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kirylkavalenka.wordpress.com/2009/11/06/allow-early-termination-early-terminate-optional-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/84374ce4315b8a8110392f23ba5cda3d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kirylkavalenka</media:title>
		</media:content>
	</item>
		<item>
		<title>DevExpress GridControl Data Binding</title>
		<link>http://kirylkavalenka.wordpress.com/2009/11/05/devexpress-gridcontrol-data-binding/</link>
		<comments>http://kirylkavalenka.wordpress.com/2009/11/05/devexpress-gridcontrol-data-binding/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 09:28:11 +0000</pubDate>
		<dc:creator>kirylkavalenka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Data Binding]]></category>
		<category><![CDATA[DevExpress]]></category>
		<category><![CDATA[GridControl]]></category>

		<guid isPermaLink="false">http://kirylkavalenka.wordpress.com/?p=13</guid>
		<description><![CDATA[Step by step guide for binding DevExpress GridControl to data tables<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kirylkavalenka.wordpress.com&amp;blog=10264931&amp;post=13&amp;subd=kirylkavalenka&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">When binding a datagrid (GridControl) to a table do the following:</div>
<div id="_mcePaste">
<ol>
<li> Create a typed dataset class by calling something like    <span style="font-family:'Courier New';font-size:small;">myDs.WriteXmlSchema(<span style="color:#a31515;">&#8220;D:\MyDataset.xsd&#8221;</span>) <span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;">in a web service web method (assuming the DAL is done on the web service). It will generate and save the schema into the file. Copy the file into the client application project.</span></span></li>
<li><span style="font-family:'Courier New';font-size:small;"><span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;">Create a dataset component by dragging the created dataset onto the form. This will create global variable of type <em>MyDataset</em> (say, <strong>m_MyDataset</strong>).</span></span></li>
<li>Set your GridControl&#8217;s <em>DataSource</em> property to <strong>m_MyDataset.MY_TABLE_</strong><em>1</em> and leave <em>DataMember</em> property empty (as opposed to setting <em>DataSource</em> to m_MyDataset and <em>DataMember</em> to MY_TABLE_1).<br />
<strong>NOTE: it is not possible to do this step in VS designer. You will need to manually modify MyForm.Designer.vb file.</strong></li>
<li>If you have another grid control which should display child records, set its <em>DataSource</em> property to the same value (m_MyDataset.MY_TABLE_1) but also specify the relation name in the <em>DataMember</em> property.</li>
</ol>
</div>
<div id="_mcePaste"><strong>WARNING</strong>: <em>GetChildRows</em><em>() </em>method of DataRow class <strong>unexpectedly ignores trailing spaces</strong> in columns which participate in the relation. The logic behind GridControls does not ignore the spaces. This behaviour may result in situation when <em>GetChildRows</em><em>() </em>returns an array of child rows which is larger than the number of rows displayed in the child GridControl.</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kirylkavalenka.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kirylkavalenka.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kirylkavalenka.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kirylkavalenka.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kirylkavalenka.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kirylkavalenka.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kirylkavalenka.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kirylkavalenka.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kirylkavalenka.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kirylkavalenka.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kirylkavalenka.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kirylkavalenka.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kirylkavalenka.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kirylkavalenka.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kirylkavalenka.wordpress.com&amp;blog=10264931&amp;post=13&amp;subd=kirylkavalenka&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kirylkavalenka.wordpress.com/2009/11/05/devexpress-gridcontrol-data-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/84374ce4315b8a8110392f23ba5cda3d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kirylkavalenka</media:title>
		</media:content>
	</item>
		<item>
		<title>Calling Oracle Associative Arrays from .NET &#8211; Passing empty array</title>
		<link>http://kirylkavalenka.wordpress.com/2009/11/05/calling-oracle-associative-arrays-from-net/</link>
		<comments>http://kirylkavalenka.wordpress.com/2009/11/05/calling-oracle-associative-arrays-from-net/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 03:11:56 +0000</pubDate>
		<dc:creator>kirylkavalenka</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Associative Array]]></category>
		<category><![CDATA[ODP.NET]]></category>

		<guid isPermaLink="false">http://kirylkavalenka.wordpress.com/?p=6</guid>
		<description><![CDATA[About passing empty arrays from ODP.NET<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kirylkavalenka.wordpress.com&amp;blog=10264931&amp;post=6&amp;subd=kirylkavalenka&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Oracle may throw binding exceptions if the array to be passed is empty.  Moreover, an empty array cannot be substituted by Nothing value as Nothing value  of Oracle Parameter means the parameter value was not set (all input parameters  values must be set before the command execution). DBNull value (which is  equivalent of Oracle Nothing value) cannot be converted to an associative  array.</p>
<p>When it is required to pass an  empty array an array containing single null value can be used. That  allows correct binding of the parameter by Oracle Provider and passing an empty  array to stored procedure:</p>
<p>.NET caller:</p>
<blockquote><p><code><span style="font-family:Courier New;color:black;font-size:x-small;"><span style="color:#008000;">'--------- INPUT parameter -------</span><br />
<span style="color:#0000ff;">Dim</span> paramInput <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">New</span> OracleParameter(<span style="color:#a31515;">"thearray"</span>, OracleDbType.Varchar2, ParameterDirection.Input)<br />
<span style="color:#008000;">'1. set CollectionType property</span><br />
paramInput.CollectionType = OracleCollectionType.PLSQLAssociativeArray<br />
<span style="color:#008000;">'2. set Value property</span><br />
paramInput.Value = <span style="color:#0000ff;">New</span> <span style="color:#0000ff;">String</span>() {<span style="color:#0000ff;">Nothing</span>}</span></code></p>
<p><span style="font-family:Courier New;color:black;font-size:x-small;"><span style="color:#008000;">&#8216;&#8212;&#8212;- OUTPUT parameter &#8212;&#8212;&#8211;</span></span></p>
<p><span style="font-family:Courier New;color:black;font-size:x-small;"><span style="color:#0000ff;">Dim</span> paramOutput <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">New</span> OracleParameter(<span style="color:#a31515;">&#8220;results&#8221;</span>, OracleDbType.Varchar2, ParameterDirection.Output)<br />
<span style="color:#008000;">&#8217;1. set CollectionType property</span><br />
paramOutput.CollectionType = OracleCollectionType.PLSQLAssociativeArray<br />
<span style="color:#008000;">&#8217;2. set Size property</span><br />
paramOutput.Size = 3<br />
<span style="color:#008000;">&#8217;3. set ArrayBindSize property</span><br />
paramOutput.ArrayBindSize = <span style="color:#0000ff;">New</span> <span style="color:#0000ff;">Integer</span>() {100, 100, 100}&gt; lCmd.Parameters.Clear()<br />
lCmd.Parameters.Add(paramInput)<br />
lCmd.Parameters.Add(paramAgentIds)</span></p>
<p><span style="font-family:Courier New;color:black;font-size:x-small;"> lCnn.Open()<br />
lCmd.ExecuteNonQuery()<br />
lCnn.Close()</span></p>
<p><span style="font-family:Courier New;color:black;font-size:x-small;"> <span style="color:#0000ff;">Dim</span> result() <span style="color:#0000ff;">As</span> OracleString = <span style="color:#0000ff;">CType</span>(paramOutput.Value, OracleString())<br />
</span></p></blockquote>
<p>PL/SQL stored procedure:</p>
<blockquote><p><code><span style="font-family:Courier New;color:black;font-size:x-small;"> <span style="color:#0000ff;">create</span> <span style="color:#0000ff;">or</span> replace<br />
package A_mypack5 <span style="color:#0000ff;">as</span><br />
<span style="color:#0000ff;">PROCEDURE</span> test_it(<br />
thearray <span style="color:#0000ff;">IN</span> INS_PKG_GLB.strings, <span style="color:#008000;">-- it is an array of strings indexed by PLS_INTEGER</span><br />
results <span style="color:#0000ff;">OUT</span> NOCOPY<br />
<span style="color:#0000ff;">END</span>; </span></code></p>
<p><span style="font-family:Courier New;color:black;font-size:x-small;"><span style="color:#0000ff;">create</span> <span style="color:#0000ff;">or</span> replace<br />
PACKAGE BODY A_MYPACK5 <span style="color:#0000ff;">AS</span><br />
<span style="color:#0000ff;">PROCEDURE</span> test_it(<br />
thearray <span style="color:#0000ff;">IN</span> INS_PKG_GLB.strings,<br />
results <span style="color:#0000ff;">OUT</span> NOCOPY INS_PKG_GLB.strings) <span style="color:#0000ff;">IS</span><br />
<span style="color:#0000ff;">begin</span><br />
results(1) := <span style="color:#a31515;">&#8216;array has &#8216;</span> || thearray.<span style="color:#0000ff;">count</span> || <span style="color:#a31515;">&#8216; elements&#8217;</span>;<br />
results(2) := <span style="color:#a31515;">&#8216;second&#8217;</span>;<br />
results(3) := <span style="color:#a31515;">&#8216;third&#8217;</span>;<br />
<span style="color:#0000ff;">END</span>;<br />
<span style="color:#0000ff;">END</span>;<br />
</span><br />
<span style="color:gray;font-size:xx-small;">* This source code was highlighted with <a href="http://virtser.net/blog/post/source-code-highlighter.aspx"><span style="color:gray;font-size:xx-small;">Source Code Highlighter</span></a>.</span></p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kirylkavalenka.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kirylkavalenka.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kirylkavalenka.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kirylkavalenka.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kirylkavalenka.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kirylkavalenka.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kirylkavalenka.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kirylkavalenka.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kirylkavalenka.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kirylkavalenka.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kirylkavalenka.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kirylkavalenka.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kirylkavalenka.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kirylkavalenka.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kirylkavalenka.wordpress.com&amp;blog=10264931&amp;post=6&amp;subd=kirylkavalenka&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kirylkavalenka.wordpress.com/2009/11/05/calling-oracle-associative-arrays-from-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/84374ce4315b8a8110392f23ba5cda3d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kirylkavalenka</media:title>
		</media:content>
	</item>
	</channel>
</rss>
