Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb_dotnet thread: set value back to null


Message #1 by "Abraham Luna" <abe@a...> on Sat, 23 Sep 2000 13:18:32 -0400
Try dbnull.value

-----Original Message-----
From: Abraham Luna [mailto:abe@a...] 
Sent: Saturday, September 23, 2000 12:19 PM
To: pro_VB_dotnet
Subject: [pro_vb_dotnet] set value back to null


ok, i populate a datagrid. some of the dates are empty so they return
null values. if i enter a date into a null field, how do i return it to
a null value if i needed to. here is some examples i have used, but they
dont work:

datagrid1.currentcell = ""  'this returns a error stating that a
datetime format is expected

datagrid1.currentcell = nothing 'this returns an error telling me to use
dbnull instead

datagrid1.currentcell = dbnull 'the ide tells me that i cannot use this
in an expression

any ideas?


---------
i'm using visual studio .net on windows 2000 pro


---
Visual Basic .NET Text Manipulation Handbook
The .NET Framework brings a variety of string manipulation features 
to the VB language, and some of these, namely regular expressions 
and the StringBuilder class, are something VB 6 developers may not 
have seen before. This book teaches you how to manipulate text using 
these string matching, manipulation, and replacement classes. Issues 
such as Localization and data conversion will also be investigated.
http://www.wrox.com/ACON11.asp?ISBN=1861007302




  Return to Index