Home All Groups Group Topic Archive Search About
Author
16 Jun 2006 3:04 PM
G .Net
Hi

Can anybody help with the following?

I'm using a DataAdaptor to write data back to a SQL Server. If the DataTable
contains divide by zero, then understandably 1.#INF is written back to the
database. However, I'd prefer to write back NULL.

Can anybody tell me how to do this?

Author
16 Jun 2006 5:59 PM
GhostInAK
Hello G .Net,

if database_value = double.positiveinfinity then
replace value with dbnull.value
endif

Show quoteHide quote
> Hi
>
> Can anybody help with the following?
>
> I'm using a DataAdaptor to write data back to a SQL Server. If the
> DataTable contains divide by zero, then understandably 1.#INF is
> written back to the database. However, I'd prefer to write back NULL.
>
> Can anybody tell me how to do this?
>
Author
16 Jun 2006 6:49 PM
G .Net
Cheers Ghost

Show quoteHide quote
"GhostInAK" <ghosti***@gmail.com> wrote in message
news:be1391bf6d948c85f42a46e5d00@news.microsoft.com...
> Hello G .Net,
>
> if database_value = double.positiveinfinity then
> replace value with dbnull.value
> endif
>
>> Hi
>>
>> Can anybody help with the following?
>>
>> I'm using a DataAdaptor to write data back to a SQL Server. If the
>> DataTable contains divide by zero, then understandably 1.#INF is
>> written back to the database. However, I'd prefer to write back NULL.
>>
>> Can anybody tell me how to do this?
>>
>
>