I have filed Codeplex Item #
                        
                            <span id="ctl00_ctl00_MasterContent_RightSideBar_WorkItemDetailsControl_DetailsSidebar_IssueIdLabel">24272 on this issue.  I hope it makes sense -- I had been up way too many hours when I pushed the &quot;send&quot; button.<br>

--<br>Vernon<br></span><br><div class="gmail_quote">On Tue, Aug 11, 2009 at 2:54 AM, Vernon Cole <span dir="ltr">&lt;<a href="mailto:vernondcole@gmail.com">vernondcole@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

No. The setup for the test script fiddles with os.path, but adodbapi itself makes no changes to sys.modules nor os.path.<div><div></div><div class="h5"><br><br><br><div class="gmail_quote">On Mon, Aug 10, 2009 at 5:29 PM, Dino Viehland <span dir="ltr">&lt;<a href="mailto:dinov@microsoft.com" target="_blank">dinov@microsoft.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Does adodbapi publish something into sys.modules under the name
adodbapi during import?</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a> [mailto:<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>] <b>On
Behalf Of </b>Vernon Cole<br>
<b>Sent:</b> Monday, August 10, 2009 4:21 PM<div><div></div><div><br>
<b>To:</b> Discussion of IronPython<br>
<b>Subject:</b> Re: [IronPython] [ANN]: IronPython 2.6 Beta 2</div></div></span></p>

</div>

</div><div><div></div><div>

<p> </p>

<p style="margin-bottom: 12pt;">Sorry to be slow getting
back... I&#39;m on vacation.<br>
In attempting to make a test case as you have requested, I suddenly run in to
the following problem:<br>
<br>
&lt;console dump&gt;<br>
C:\temp&gt;ipy ipy_bug.py<br>
<br>
C:\temp&gt;&quot;c:\program files\Ironpython 2.0.2\ipy.exe&quot; ipy_bug.py<br>
version= adodbapi v2.2.7a1<br>
Executing the command: &quot;select * from Products&quot;<br>
result rowcount shows as= 6. (Note: -1 means &quot;not known&quot;)<br>
<br>
result data description is:<br>
            NAME TypeCd
DispSize IntrnlSz Prec Scale Null?<br>
      ItemNumber     
3        4       
4   10   255     1<br>
        ItemName   
202       12      
50  255   255     1<br>
     UnitsOnHand     
4       
4        4    7  
255     1<br>
     CostPerUnit   
131       19      
19   14     4     1<br>
     LastOrdered     
7       
8        8  255  
255     1<br>
<br>
result first ten records are:<br>
(1, &#39;Widgit&#39;, 5.0, Decimal(&quot;15.1234&quot;), datetime.datetime(2009, 1, 29,
13, 5, 30)<br>
)<br>
(2, &#39;Thingamajig, Standard&#39;, 505.0, Decimal(&quot;0.1000&quot;),
datetime.datetime(2009, 1<br>
, 29, 15, 5, 19))<br>
(3, &#39;Left Handed Smoke Shifter&#39;, 1.0, Decimal(&quot;1000000.0000&quot;),
datetime.datetime<br>
(2008, 4, 1, 12, 0))<br>
(4, &#39;Gravel (Bulk)&#39;, 100.25, Decimal(&quot;32.4567&quot;),
datetime.datetime(2009, 1, 29,<br>
13, 5, 31))<br>
(5, &#39;Tube, Drinking, Plastic, For cold liquids&#39;, 500000.0,
Decimal(&quot;0.0013&quot;), da<br>
tetime.datetime(2009, 1, 29, 13, 5, 32))<br>
(6, &#39;Annoy-A-Tron&#39;, 1.0, Decimal(&quot;12.9500&quot;), datetime.datetime(2009,
1, 29, 13,<br>
5, 33))<br>
<br>
C:\temp&gt;ipy26 ipy_bug.py<br>
<br>
C:\temp&gt;&quot;c:\program files\Ironpython 2.6\ipy.exe&quot; ipy_bug.py<br>
version= adodbapi v2.2.7a1<br>
Traceback (most recent call last):<br>
  File &quot;ipy_bug.py&quot;, line 52, in ipy_bug.py<br>
AttributeError: &#39;module&#39; object has no attribute &#39;adodbapi&#39;<br>
&lt;/console dump&gt;</p>

<div>

<p>The offending line is:<br>
adodbapi.adodbapi.defaultIsolationLevel = adodbapi.adXactBrowse<br>
<br>
I never have understood why it was necessary to use the
adodbapi.adodbapi.(whatever) construct, but smarter people than me said that
was necessary, and they are correct.  If the redundant-looking entry is
not used, the programs runs without an error message, but does not actually
perform the intended function. If, for example, the line<br>
adodbapi.adodbapi.defaultCursorLocation = adodbapi.adUseClient<br>
is changed to<br>
adodbapi.defaultCursorLocation = adodbapi.adUseClient<br>
then the program will run, but the rowcount will return as -1, rather than 6,
because the cursor is not actually changed to a local cursor.<br>
<br>
So, to make a long story short: some change in IPy 2.6 has broken a needed (if
ugly looking) feature in adodbapi.<br>
I will file a bug in codeplex as soon as I can isolate a good example.<br>
--<br>
Vernon<br>
<br>
<br>
<br>
On Mon, Aug 3, 2009 at 5:33 PM, Dino Viehland &lt;<a href="mailto:dinov@microsoft.com" target="_blank">dinov@microsoft.com</a>&gt; wrote:</p>

<div>

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Ok, I’ve finally got SQL server
setup in a reasonable state where I can try and repro this.  This is what
I’m trying to do.  I have a database called “mydatabase” which contains a
table “Table_1” which contains 1 column of type binary(4).  I then attempt
to do:</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">import System</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">conn =
System.Activator.CreateInstance(System.Type.GetTypeFromProgID(&quot;ADODB.Connection&quot;))</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">connstr = &quot;driver={SQL
Server};Server=localhost;Database=mydatabase;Initial
Catalog=mydatabase;Trusted_Connection=True;&quot;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">conn.ConnectionString = connstr</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">conn.Open()</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">rs =
System.Activator.CreateInstance(System.Type.GetTypeFromProgID(&quot;ADODB.RecordSet&quot;))</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">rs.Open(&quot;Table_2&quot;,
conn, 1, 2, 2)  # source, active connection, cursor type (adOpenKeyset),
lock type (adLockPessimistic), CommmandType (adCmdTable)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">rs.AddNew()</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">b =
System.Array[System.Byte]((2,3,4,5))</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">x = rs[&#39;Test1&#39;]</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">x.AppendChunk(b)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">which fails with: </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">EnvironmentError:
System.Runtime.InteropServices.COMException (0x800A0C93): Operation is not
allowed in this context.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">This is the same failure I get
if I use Shri’s proposed work around.  Do you have any idea of what I’m
doing wrong or any suggestions on how to tweak this to get the correct simple
repro?</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">

<div>

<div style="border-style: solid none none; border-color: -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>
[mailto:<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>]
<b>On Behalf Of </b>Vernon Cole<br>
<b>Sent:</b> Thursday, July 23, 2009 10:11 PM<br>
<b>To:</b> Discussion of IronPython<br>
<b>Subject:</b> Re: [IronPython] [ANN]: IronPython 2.6 Beta 2</span></p>

</div>

</div>

<div>

<div>

<p> </p>

<p style="margin-bottom: 12pt;">Guys:<br>
  Good work on the new release, and the 215 bug fixes. As usual, as soon
as the new beta was announced I downloaded and tested it.<br>
<br>
Somehow I got the idea that the adodbapi test had been included in the
IronPython test suite. Did you only include the tests that already pass? 
Issue 18222 is still unfixed -- so adodbapi still fails, and you still cannot
pass a read-only buffer as a COM parameter.<br>
<br>
I realize that no one has voted up this rather obscure bug. Perhaps if it were
titled &quot;fully support DB API 2.0 compliant database access using ADO&quot;
it would have gotten more votes. Nevertheless, this issue has been outstanding
for 11 months, and is the only remaining failure in adodbapi for versions 2.3
thru 3.1 of python. Please try to get to it before 2.6 final.  <br>
<br>
Please !!!???<br>
--<br>
Vernon Cole<br>
<br>
P.S. -- I plan to make a version of adodbapi which uses real <a href="http://ADO.NET" target="_blank">ADO.NET</a>, rather than ADO via COM, but
I want the current version to be solid before I start mucking it up.</p>

</div>

</div>

</div>

</div>

</div>

<p style="margin-bottom: 12pt;"><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a></p>

</div>

<p> </p>

</div></div></div>

</div>

</div>


<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br>