Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 26th, 2004, 08:14 PM
Authorized User
 
Join Date: Jul 2003
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar for all of the help. The $64,000 question is exactly that. How does it get set to 12:00:00 am. Each of the fields is definitely set to NULL, so there is nothing to start with. I do a basic read using VB and a DataReader. I use a conditional statement(show in a previous part of this post) that only sets the value equal to the DataReader column if it is not NULL. So I really haven't got a clue. I have googled this till I'm blue in the face and haven't come up with a thing. I seem to vaguely remember a post about this somewhere, but can't find it to save my life.

 
Old February 27th, 2004, 02:51 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right. So you're saying that the Reader returns a time of 12:00? That is:

If Not IsDBNull(myReader("StartDate")) Then
    _StartDate = myReader("StartDate")
End If

will be hit, even when the field StartDate is NULL in the database?
Did you also try the IsDBNull method of the Reader object to test the NULL value?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old February 27th, 2004, 07:09 AM
Authorized User
 
Join Date: Jul 2003
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That is correct Imar. I really don't know why this is happening.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Dates and Null Values eliza ASP.NET 2.0 Basics 6 February 2nd, 2007 01:18 PM
How to write NULL Dates Aaron Edwards ASP.NET 2.0 Basics 2 December 6th, 2006 06:20 PM
Handling Null Values ~Bean~ ASP.NET 1.x and 2.0 Application Design 1 January 31st, 2006 02:02 PM
Handling Null Values nvenkat75 ADO.NET 2 January 16th, 2006 05:46 PM
How to set Not Null constraint to Null Columns arasu Oracle 1 August 22nd, 2005 10:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.