Re: Problem with x64 Oracle OLE DB Provider, MS ADO,server side forward cursor

From: PBarnes <pbarnes1970_at_gmail.com>
Date: Tue, 10 Mar 2009 08:09:06 -0700 (PDT)
Message-ID: <24c2ab15-42b7-49c0-ad0c-f7cb3235f67e_at_r36g2000prf.googlegroups.com>


On Mar 4, 4:31 pm, pbarnes1..._at_gmail.com wrote:
> With 64 bit Oracle 10 or 11 client, using MS ADO with a server side
> forward only cursor to run a simple query against a single table, the
> result Recordset does not contain all rows. In fact the number of
> records I can see is equal to the Recordset.CacheSize. It works as
> expected when runnning in 32 bit app.
>
> The client is Vista x64 and I have installed both 32 bit and 64 bit
> versions of Oracle Client, and get same results with latest Oracle 10
> and 11 clients. I have tried against a 32 bit server running Oracle
> 9.2.0.1.0 and another 32 bit server running 10.2.0.1.0, both with
> identical results.
>
> I have tried this with ADO 2.5, 2.6, 2.7, and 6.0, again with same
> results.
>
> Here is a VBA script that demonstrates:
> --------------------------------------
> cs = "Provider=OraOLEDB.Oracle.1;Password=(edit);Persist Security
> Info=True;User ID=(edit);Data Source=(edit);Extended Properties="""""
> qs = "SELECT * FROM MYTABLE"
>
> Set rs = CreateObject("ADODB.Recordset")
> rs.CacheSize = 10
> rs.CursorLocation = 2 ' adUseServer
> rs.CursorType = 0 ' adOpenForwardOnly
> rs.Open qs, cs, 0, 1 ' 0=adOpenForwardOnly, 1=adLockReadOnly
>
> cnt = 0
> rs.MoveFirst ' same with or without this
> While Not rs.EOF
> cnt = cnt + 1
> rs.MoveNext
> Wend
> MsgBox CStr(cnt)
> ----------------------------------------------------------
> When I run this with 32 bit version of wscript.exe ( in %WINDIR%
> \SysWow64) it displays the correct number of records (200 in one
> table, 12000 in another I tried.) When I run with 64 bit version of
> wscript.exe (in %WINDIR%\system32) it always displays 10 records and
> reaches EOF. If I change the cache size to N, I get N records.
>
> Has anyone else seen this? Does anyone have any ideas how to fix or
> workaround this issue?

Oracle Support has confirmed that this is a known bug with their x64 OLE DB Provider (all versions.) Their bug number is 6623430. I'll try to update this thread when I get more information on when a fix will be available. Received on Tue Mar 10 2009 - 16:09:06 CET

Original text of this message