Hello,
I have a table with about 1 million rows.
I need to scroll them and use sqldatareader for that.
The TimeOut property of command object i use to create
the reader is set to 0. I use MSDE 2000 on my local computer.
The problem is that although my timeout is set to 0 which assumes that it is infinite it still gives me TimeOut exception after retrieving approximately 20000 rows (different each time). The interesting thing is that reader.Read() works fine and returns true, but reader.getvalue(<anyindex>) crashes.
This is obviously a bug because if i set my command's timeout to 65000 it works fine.
Is there any bugfix? Or an explanation to this probelm?

Re: CommandTimeOut Problem by William

William
Wed Jul 07 21:05:23 CDT 2004

There was an issue IIRC with the CommandTimeout property in the 1.0 version
of the Framework that was fixed in 1.1. However, I would take another
approach. Why not fetch a few thousand rows at a time. There are lots of
scrolling techniques that are a lot more efficient and far less demanding on
the server. In any case, you can set the timeout to a very large number (as
you have done).

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"Yurcus" <Yurcus@discussions.microsoft.com> wrote in message
news:BBF6AE9A-5840-4665-9BF3-27EB22AE31C7@microsoft.com...
> Hello,
> I have a table with about 1 million rows.
> I need to scroll them and use sqldatareader for that.
> The TimeOut property of command object i use to create
> the reader is set to 0. I use MSDE 2000 on my local computer.
> The problem is that although my timeout is set to 0 which assumes that it
is infinite it still gives me TimeOut exception after retrieving
approximately 20000 rows (different each time). The interesting thing is
that reader.Read() works fine and returns true, but
reader.getvalue(<anyindex>) crashes.
> This is obviously a bug because if i set my command's timeout to 65000 it
works fine.
> Is there any bugfix? Or an explanation to this probelm?
>



Re: CommandTimeOut Problem by Yurcus

Yurcus
Thu Jul 08 09:11:01 CDT 2004

My framework is 1.1.
I just found bugfix for SQL Server DataProvider http://support.microsoft.com/default.aspx?scid=kb;en-us;823679
but it looks like getting the actual bugfix is very complicated:))


"William (Bill) Vaughn" wrote:

> There was an issue IIRC with the CommandTimeout property in the 1.0 version
> of the Framework that was fixed in 1.1. However, I would take another
> approach. Why not fetch a few thousand rows at a time. There are lots of
> scrolling techniques that are a lot more efficient and far less demanding on
> the server. In any case, you can set the timeout to a very large number (as
> you have done).
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
>
> "Yurcus" <Yurcus@discussions.microsoft.com> wrote in message
> news:BBF6AE9A-5840-4665-9BF3-27EB22AE31C7@microsoft.com...
> > Hello,
> > I have a table with about 1 million rows.
> > I need to scroll them and use sqldatareader for that.
> > The TimeOut property of command object i use to create
> > the reader is set to 0. I use MSDE 2000 on my local computer.
> > The problem is that although my timeout is set to 0 which assumes that it
> is infinite it still gives me TimeOut exception after retrieving
> approximately 20000 rows (different each time). The interesting thing is
> that reader.Read() works fine and returns true, but
> reader.getvalue(<anyindex>) crashes.
> > This is obviously a bug because if i set my command's timeout to 65000 it
> works fine.
> > Is there any bugfix? Or an explanation to this probelm?
> >
>
>
>