Re: Null Values
- From: "Scott M." <s-mar@xxxxxxxxxxxxx>
- Date: Sat, 9 Apr 2005 12:59:36 -0400
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.
"Kevin" <kevgrim@xxxxxxxxx> wrote in message
news:u$6ybQJPFHA.4064@xxxxxxxxxxxxxxxxxxxxxxx
> 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.
>
> "William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxxx> wrote in message
> news:euTvY0IPFHA.3072@xxxxxxxxxxxxxxxxxxxxxxx
>> 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.
>> __________________________________
>>
>> "Kevin" <kevgrim@xxxxxxxxx> wrote in message
>> news:up8olMGPFHA.1884@xxxxxxxxxxxxxxxxxxxxxxx
>>> 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??
>>>
>>>
>>
>>
>
>
.
- References:
- Null Values
- From: Kevin
- Re: Null Values
- From: William \(Bill\) Vaughn
- Re: Null Values
- From: Kevin
- Null Values
- Prev by Date: Problem retrieving output parameter
- Next by Date: Data Access Layer that allows Multiple Data Sources
- Previous by thread: Re: Null Values
- Next by thread: Error: There is no Original data to access
- Index(es):
Relevant Pages
|