<?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/"
	>

<channel>
	<title>sides of march &#187; visual basic 6</title>
	<atom:link href="http://www.sidesofmarch.com/index.php/archive/tag/visual-basic-6/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sidesofmarch.com</link>
	<description>Thoughts on life, liberty, and information technology</description>
	<lastBuildDate>Mon, 16 Jan 2012 02:43:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Debugging &#8216;Multiple-step operation generated errors&#8217; errors in VB6 and SQL 2005</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2008/06/26/debugging-multiple-step-operation-generated-errors-errors-in-vb6-andsql-2005/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2008/06/26/debugging-multiple-step-operation-generated-errors-errors-in-vb6-andsql-2005/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 18:03:14 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[sql 2005]]></category>
		<category><![CDATA[visual basic 6]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/?p=258</guid>
		<description><![CDATA[<p>I just blogged about CSFBL moving to its new server. All was going well, until I tried to kick off the sim engine, a big part of which is written in Visual Basic 6.0 (cringe, I know, but who has time to rewrite legacy code?).</p>
<p>The sim engine is implemented as a DLL which gets invoked via COM. This part works fine; the DLL is activated, properties are sent to it, and it runs&#8230; then crashes, with the following obscure error:</p>
<blockquote><p>Error Number: -2147217887
Description: Multiple-step operation generated errors. Check each status value.</p></blockquote>
<p>I searched, and searched&#8230; nothing. I recompiled, and checked settings&#8230; nothing. I prayed, and finally found this post: <a href="http://www.developersdex.com/sql/message.asp?p=581&#38;r=4737805">http://www.developersdex.com/sql/message.asp?p=581&#38;r=4737805</a></p>
<p>Here&#8217;s what caught my eye first in the post:</p>
<blockquote><p>Database: SQL Server 2000 Standard (works fine)
Database: SQL Server 2005 Standard (fails)</p></blockquote>
<p>Hey, that&#8217;s exactly the change in my production environment! Reading more, I find that they&#8217;re talking about legacy VB6 code, and client-side RecordSets &#8212; two things I make extensive use of. Please, don&#8217;t make <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2008/06/26/debugging-multiple-step-operation-generated-errors-errors-in-vb6-andsql-2005/">Debugging &#8216;Multiple-step operation generated errors&#8217; errors in VB6 and SQL 2005</a></span>]]></description>
			<content:encoded><![CDATA[<p>I just blogged about CSFBL moving to its new server. All was going well, until I tried to kick off the sim engine, a big part of which is written in Visual Basic 6.0 (cringe, I know, but who has time to rewrite legacy code?).</p>
<p>The sim engine is implemented as a DLL which gets invoked via COM. This part works fine; the DLL is activated, properties are sent to it, and it runs&#8230; then crashes, with the following obscure error:</p>
<blockquote><p>Error Number: -2147217887<br />
Description: Multiple-step operation generated errors. Check each status value.</p></blockquote>
<p>I searched, and searched&#8230; nothing. I recompiled, and checked settings&#8230; nothing. I prayed, and finally found this post: <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.developersdex.com%2Fsql%2Fmessage.asp%3Fp%3D581%26amp%3Br%3D4737805&sref=rss">http://www.developersdex.com/sql/message.asp?p=581&amp;r=4737805</a></p>
<p><span id="more-258"></span>Here&#8217;s what caught my eye first in the post:</p>
<blockquote><p>Database: SQL Server 2000 Standard (works fine)<br />
Database: SQL Server 2005 Standard (fails)</p></blockquote>
<p>Hey, that&#8217;s exactly the change in my production environment! Reading more, I find that they&#8217;re talking about legacy VB6 code, and client-side RecordSets &#8212; two things I make extensive use of. Please, don&#8217;t make me rewrite all this code, not today&#8230;</p>
<p>Reading more (on <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.developersdex.com%2Fsql%2Fmessage.asp%3Fp%3D581%26amp%3Br%3D4737805%26amp%3Bpage%3D2&sref=rss">page two of the thread</a>), I find this:</p>
<blockquote><p><span style="font-family: Verdana,Arial; font-size: x-small;">Now, at last, I have isolated the problem and wasn&#8217;t the SHAPE command that<br />
raised the error, but a UNION SELECT in a query of one of my subrecordsets.</span></p></blockquote>
<p>Hey, that&#8217;s <em>exactly</em> the type of query that is running early on in my code, where I call a stored procedure that uses a UNION SELECT statement. Could this be it?</p>
<p>A hint at a possible fix comes from a <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fforums.devx.com%2Fshowthread.php%3Ft%3D166263&sref=rss">DevX forums post</a>, which details the same problem and ends with this:</p>
<blockquote><p><strong>The workaround I can think of is to bounce data over a temp table.</strong></p></blockquote>
<p>I quickly opened up the stored procedure with the UNION SELECT statements, rewrote it to remove the UNION statements (using a temp table for temporary data), and recompiled. Rerunning my code yielded&#8230;</p>
<p><em><strong>SUCCESS!!!</strong></em></p>
<p>It is situations like this where I am reminded how much I can absolutely hate Microsoft. It also reminds me that no two production environments are the same, and a database that is identical in both SQL 2000 and SQL 2005 may not be identical in implementation.</p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=258&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2008/06/26/debugging-multiple-step-operation-generated-errors-errors-in-vb6-andsql-2005/' addthis:title='Debugging &#8216;Multiple-step operation generated errors&#8217; errors in VB6 and SQL 2005 ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2008/06/26/debugging-multiple-step-operation-generated-errors-errors-in-vb6-andsql-2005/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

