Re: DBnull, Date and DataAdapter
From: blue_nirvana (bluenirvana_at_discussions.microsoft.com)
Date: 01/05/05
- Next message: Marina: "Re: DBnull, Date and DataAdapter"
- Previous message: Makarand Keer: "Handling very huge data"
- In reply to: Marina: "Re: DBnull, Date and DataAdapter"
- Next in thread: Marina: "Re: DBnull, Date and DataAdapter"
- Reply: Marina: "Re: DBnull, Date and DataAdapter"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 5 Jan 2005 09:53:04 -0800
I have a strongly-type dataset with a datatable from SQL Server. This
datatable has a column called CloseDate that allows nulls. But when trying
to assign DbNull.Value to the column in code, I get "Value of type
'System.DbNull' cannot be converted to 'Date'. For example, dr.CloseDate =
DbNull.Value
I read somewhere that you cannot update a datetime column in SQL Server
using a DataAdapter. Is that true? If not, how do you assign a null value
to a datetime column in a SQL Server table using a DataAdapter?
Thanks
"Marina" wrote:
> Are you talking about call the Update method on a dataset? What do you mean
> by 'using a SqlDataAdapater'?
>
> "blue_nirvana" <bluenirvana@discussions.microsoft.com> wrote in message
> news:E1E2A7CB-9114-4DF8-984A-F5DC2654FA46@microsoft.com...
> > Is there a way to assign a datetime column in SQL Server to Null using a
> > SQLDataAdapter? I know you can do it by calling a stored procedure and
> > setting a parameter equal to DBnull.Value. But it does not make since to
> me
> > that you can not set a datetime column to null from a SQLDataAdapter.
> >
> > Thanks
>
>
>
- Next message: Marina: "Re: DBnull, Date and DataAdapter"
- Previous message: Makarand Keer: "Handling very huge data"
- In reply to: Marina: "Re: DBnull, Date and DataAdapter"
- Next in thread: Marina: "Re: DBnull, Date and DataAdapter"
- Reply: Marina: "Re: DBnull, Date and DataAdapter"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|