Re: Datagrid
- From: Gaurav <Gaurav@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Sep 2005 16:37:01 -0700
Thanx for your reply Frank.
The fields in the database are not supposed to except null values. my
mistake, i should have said the first time itself that I am only inserting in
the time part as these fields are only suppose to hold time data, i.e.
start_time and end_time for an activity..and only the time data is entered
from a VB.NET form...I even tried to check the value in the Dataset with the
following code...
Me.DataGrid1.SetDataBinding(fr.DsProj1, "tblBilling")
MsgBox(fr.DsProj1.Tables(0).Rows(0).Item(3))
"DsProj1" --> is my dataset.
"tblBilling"--> is the table name.
It displays the time value correctly from the dataset that i have used to
bind the Datagrid with. however I the datagrid itself it shows the date data
and not the time data. Is there any special formatting that i need to do with
the datagrid to display the time data in the field??
thnx for the help!!
"Frank Hickman [MVP]" wrote:
> "Gaurav" <Gaurav@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:E0C54602-D7C0-4495-B594-9FDA3302A906@xxxxxxxxxxxxxxxx
> >I am displaying data from the SQL database in a datagrid. everything seems
> >to
> > be working fine except to columns. I have 2 cols start_time and end_time
> > in
> > the database. when these 2 cols are displayed in the datagrid it shows the
> > values as 30/12/1899 for all the rows in these 2 cols....any help
> > appreciated...
> >
> > thanx
>
> This is the default value for a date which is zero (NULL). If the column
> supports NULLs, you should test for this value prior to inserting it into
> the database and if it matches, set the column to NULL instead of inserting
> the date. If your using MFC or some other datetime class, there should be
> an IsValid function that you can use.
>
> --
> ============
> Frank Hickman
> Microsoft MVP
> NobleSoft, Inc.
> ============
> Replace the _nosp@m_ with @ to reply.
>
>
>
.
- References:
- Datagrid
- From: Gaurav
- Re: Datagrid
- From: Frank Hickman [MVP]
- Datagrid
- Prev by Date: Re: Datagrid
- Next by Date: How 2 use DB relationships without re-programming them in VB.NET?
- Previous by thread: Re: Datagrid
- Next by thread: ADO Find Help?
- Index(es):
Relevant Pages
|
|