Send a <NULL> value 
Author Message
 Send a <NULL> value

I'm trying to send a <NULL> value to a date field in a SQL
database.  Specifically, updating existing dates.  In SQL,
I can do this with 'Ctrl+0' when I'm on the field.

DBNull.Value for a date seems to be '1/1/1900 12:00:00 AM'

VBNull.Date seems to be '7'.

Any advice?
Thanx



Sat, 18 Dec 2004 04:18:58 GMT  
 Send a <NULL> value
Brian,
Set the field to Convert.DBNull

/Per Hultqvist


Quote:
> I'm trying to send a <NULL> value to a date field in a SQL
> database.  Specifically, updating existing dates.  In SQL,
> I can do this with 'Ctrl+0' when I'm on the field.

> DBNull.Value for a date seems to be '1/1/1900 12:00:00 AM'

> VBNull.Date seems to be '7'.

> Any advice?
> Thanx



Sun, 19 Dec 2004 03:51:46 GMT  
 Send a <NULL> value
I get the same date as DBNull.Value:

'1/1/1900 12:00:00 AM'

???

Quote:
>-----Original Message-----
>Brian,
>Set the field to Convert.DBNull

>/Per Hultqvist



>> I'm trying to send a <NULL> value to a date field in a
SQL
>> database.  Specifically, updating existing dates.  In
SQL,
>> I can do this with 'Ctrl+0' when I'm on the field.

>> DBNull.Value for a date seems to be '1/1/1900 12:00:00
AM'

>> VBNull.Date seems to be '7'.

>> Any advice?
>> Thanx

>.



Sun, 19 Dec 2004 21:35:10 GMT  
 Send a <NULL> value
How are you reading this value?  In Query Analyzer?  Or by re-reading it
into a DataTable and looking in Debug/Watch?  Or perhaps printing it out
somewhere?  The reason that I ask is I have run into problems with some
utilities showing this date by default for a NULL field.  TOAD (Tool for
Oracle Application Developers) (provides the same functionality for Oracle
as Query Analyzer and Enterprise Manager do for SQL Server) was bad about
that.  Also I have found that VB6 by default also displays this way. So
check your tools.

HTH

David

Quote:
> I get the same date as DBNull.Value:

> '1/1/1900 12:00:00 AM'

> ???

> >-----Original Message-----
> >Brian,
> >Set the field to Convert.DBNull

> >/Per Hultqvist



> >> I'm trying to send a <NULL> value to a date field in a
> SQL
> >> database.  Specifically, updating existing dates.  In
> SQL,
> >> I can do this with 'Ctrl+0' when I'm on the field.

> >> DBNull.Value for a date seems to be '1/1/1900 12:00:00
> AM'

> >> VBNull.Date seems to be '7'.

> >> Any advice?
> >> Thanx

> >.



Mon, 20 Dec 2004 00:29:43 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. <<<<<<<<ComboBox>>>>>>>>>>>>

2. HELP >>>>>>WIN API <<<<<<<<<<

3. help me out please!!!!<<<<<<<<<<<<<<<<<<<<<<<thanks>>>>>>>>>>>>>>>>>>>>>>>>

4. <<<<Changing Value to CURRENCY>>>>>

5. <><><>HELP<><><> PCMCIA Motorola Montana 33.6

6. <<<<HELP- OLE container Control>>>>>>>>>

7. VB5<->RDO2<->ODBC<->ORACLE Procedure Problem

8. <<<Cneck Box>>>

9. <<<Gif Files>>>

10. <<<CD ROM>>>

11. <<<Win32Api.TXT>>>

12. <<<NetWork Drv>>>

 

 
Powered by phpBB® Forum Software