Solved

empty date field in the datagrid

Posted on 2003-12-11
6
288 Views
Last Modified: 2010-05-03
I have a column in SQL database table with date datatype. If user does not enter date in this field adding a new record the datagrid displays 1/1/1900. How can I avoid this and display an empty cell? Please, help.
0
Comment
Question by:Marinasout
6 Comments
 
LVL 1

Accepted Solution

by:
bladefist earned 250 total points
ID: 9923854
maybe your database puts that date as a default. Visual Basic wouldnt just randomly do that. Check your database metadata
0
 
LVL 8

Expert Comment

by:ampapa
ID: 9924463
Are you sure the field is empty? The field should be NULL if it is truly empty. It looks like something is being added to the record as indicated by what usually is an invalid date "1/1/1900"?
0
 

Author Comment

by:Marinasout
ID: 9927921
Hi, bladefist
you area right. Database puts that date as default. How can I check metadata?
0
 
LVL 27

Expert Comment

by:planocz
ID: 10270565
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
No response from Marinasout from 12/12/2003 comment
Award points to bladefist is recommend.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

planocz
EE Cleanup Volunteer
0
 

Author Comment

by:Marinasout
ID: 10372140
Yes, the field was NULL and in this case it shows 1/1/1900. To avoid this i added requird field validator. Thank you. I accepted the answer.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now