Re: Invalid attempt to read when no data is present
- From: "Christopher Reed" <carttu@xxxxxxxxxxxxx>
- Date: Wed, 21 Dec 2005 08:33:47 -0600
No, because it has no row to acquire a null value from. This is why
dtrReceivers.Read() returns a false when it is out of rows to read.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Dave" <Dave@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4FBE7619-1E9B-46CF-B2EA-F89BB2121FFE@xxxxxxxxxxxxxxxx
> I'm using a datareader to get data from an sql table. The line that gives
> the
> error is as follow,
>
> dtrReceivers["Site_V"].ToString()
>
> which gives the error,
>
> Invalid attempt to read when no data is present
>
> which is correct. The line works when data is in the row. But shouldn't
> the
> data reader return a null! How can I check to see if data is in the row?
>
> Thanks in advance,
>
> David
.
- Prev by Date: killing a process from task manager does not fire console CTRL_CLOSE_EVENT
- Next by Date: Re: Invalid attempt to read when no data is present
- Previous by thread: killing a process from task manager does not fire console CTRL_CLOSE_EVENT
- Next by thread: Re: Invalid attempt to read when no data is present
- Index(es):
Relevant Pages
|