Re: mdac 2.8 fails to execute a cursor fetch next when done via oledb (repost)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Gugick (davidg-nospam_at_imceda.com)
Date: 12/13/04


Date: Mon, 13 Dec 2004 15:48:55 -0500

Rudolf Wiener wrote:
> I have an SQL script that uses a cursor to update some rows. I loop
> through all the records using 'fetch next from mycursor'.
>
> This works fine when executed in SQL Query Analyzer. When sending the
> very same script via OLEDB to the SQL Server I get an unspecified
> OLEDB error. I could locate the spot where the error occurs the first
> time,
> it's at the 'fetch next'.
>
> I did not test all available MDAC versions. But I succeeded with
> versions 2.6 and 2.7SP1. Version 2.8, the latest one, gives me
> troubles.
>
> Any hints, insights?
>
> TIA
> Rudi Wiener

You'll need to post some of your MDAC code so we can see how you are
executing the SQL statements, etc. How are you sending this information
to the server? Statement by statement? Are you checking @@fetch_status
to make sure it's 0 after each fetch? Why not use a stored procedure for
this?

-- 
David Gugick
Imceda Software
www.imceda.com 


Relevant Pages

  • Re: MySQL VARCHAR missing value content
    ... All of the records that is supposed to FETCH is intact though... ... If the SQL is wrong, ... Procedure Division using lnk-DBI ... At the end of the game,, I do NOT need to return the info in lnk-DBI back to the DBI class - granted, using the Animator to take a look I will see different Hex value references to the Collection in the DBI Class and in this method; but they are both 'pointers' to the same object reference. ...
    (comp.lang.cobol)
  • Re: ask for standard sp writing
    ... SQL Server Programmer ... > -- Declare the variables to store the values returned by FETCH. ... > OPEN SampleCrsr ...
    (microsoft.public.sqlserver.programming)
  • RE: Linq SubmitChanges and DataLoadOptions
    ... If you have set Auto-Sync on the columns, LINQ to SQL will fetch them back ...
    (microsoft.public.dotnet.framework.adonet)
  • mdac 2.8 fails to execute a cursor fetch next when done via oledb (repost)
    ... I have an SQL script that uses a cursor to update some rows. ... through all the records using 'fetch next from mycursor'. ... same script via OLEDB to the SQL Server I get an unspecified OLEDB ...
    (microsoft.public.data.oledb)
  • mdac 2.8 fails to execute a cursor fetch next when done via oledb
    ... I have an SQL script that uses a cursor to update some rows. ... through all the records using 'fetch next from mycursor'. ... same script via OLEDB to the SQL Server I get an unspecified OLEDB error. ...
    (microsoft.public.sqlserver.programming)