Newbie Warning!

There, out with the full disclosure.

I have a datatable with a variable "CreationDate" of type TimeStamp.

I'm trying to learning Data Binding, when I drag the table onto my Windows
Form (2.0) and try to compile, I get an error about incompatible type
conversions.

What I want to happen is to have the TimeStamp displayed as a Date on my
form (read-only, not updateable).
How do I need to configure the databinding so that a TimeStamp (byte[]) is
converted properly?

TIA

RE: VS2005, C#, DataBinding of SqlServer 2K TimeStamp datatype by NoSpamMgbworld

NoSpamMgbworld
Fri Feb 03 10:10:33 CST 2006

SQL Server Timestamps are not dates, no matter how you slice them. They are
an internal structure that guarantee a changed row is flagged:
http://www.sqlteam.com/item.asp?ItemID=1410

If you want a date, redesign to be a date (or add an additional date column).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


"ESmith" wrote:

> Newbie Warning!
>
> There, out with the full disclosure.
>
> I have a datatable with a variable "CreationDate" of type TimeStamp.
>
> I'm trying to learning Data Binding, when I drag the table onto my Windows
> Form (2.0) and try to compile, I get an error about incompatible type
> conversions.
>
> What I want to happen is to have the TimeStamp displayed as a Date on my
> form (read-only, not updateable).
> How do I need to configure the databinding so that a TimeStamp (byte[]) is
> converted properly?
>
> TIA
>
>
>

Re: VS2005, C#, DataBinding of SqlServer 2K TimeStamp datatype by William

William
Sat Feb 04 14:15:46 CST 2006

IMHO there is a bug in the way that data columns are bound and managed in
the DataGridView... Yes, a TimeStamp isn't really a time (it used to be in
ages past) but it (along with other binary datatypes) aren't handled
correctly in the DataGridView. You'll need to hide the column (users should
never see or set this) or handle the DataError event...

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
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.
__________________________________

"ESmith" <eliana_smith@hotmail.com> wrote in message
news:euU551$JGHA.2900@TK2MSFTNGP14.phx.gbl...
> Newbie Warning!
>
> There, out with the full disclosure.
>
> I have a datatable with a variable "CreationDate" of type TimeStamp.
>
> I'm trying to learning Data Binding, when I drag the table onto my Windows
> Form (2.0) and try to compile, I get an error about incompatible type
> conversions.
>
> What I want to happen is to have the TimeStamp displayed as a Date on my
> form (read-only, not updateable).
> How do I need to configure the databinding so that a TimeStamp (byte[]) is
> converted properly?
>
> TIA
>