Null Values

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

Am fed up with Null values crashing my applications and screwing up data
when it hits a check or combo box, in Visual Studio 2002.
Have found numerous fixes on various sites and now feel am going round in
circles.
What is the best and most reliable way of dealing with Nulls??
 
That's a pretty broad question. What exceptions are you seeing? How are your
tables defined in the sense of column definitions? What techniques are you
using to fetch or update the data? What database are you using? Jet/Access,
SQL Server, Oracle, DB2?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Am using SQL Server 2000. The tables use a default of 0 for the bit fields.
Have been using VB for years and never hit any serious data problems like
this.
Am trying to keep myself upto date and with my initial attempts at data with
VB.NET has resulted in disaster. In my ignorance have used the DataForm
Wizard and really screwed up the data because there was a Null value for a
checkbox.
This is a known bug but there are dozens of fixes published but, because am
new to VB.NET am not sure of the merit of each fix. Also getting the same
problem with a combo box.
Because am not familiar with the sequence the data events are fired, am not
sure where to place the fix code, or what data object to apply it to. Am
used to connections and recordsets but all these datasets and adapters are
very bewildering to a novice.

Thanks in advance for any help.
 
The best advice is to always check inbound values for null before processing
them. You can use the IsDBNull(value) function or you can check a value
against DBNull.value.
 
Back
Top