Re: ADOrs "Invalid Use of Null"
- From: "Rick Rothstein \(MVP - VB\)" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
- Date: Thu, 18 Jan 2007 15:02:44 -0500
totcoll_by_speci = IIf(IsNull(!TotCollectedBySpecie), 0,
!TotCollectedBySpecie)
Yeah, that will work, but others here have pointed out that the IIF
construct is not known for its efficiency. If you are going to do it
using IsNull and the IIF, it is faster if you eliminate the IIF and
use a simple IF statement instead.
Heresy! <mumble><mumble>can you imagine?<mumble><mumble>counseling someone
to not use a one-liner<mumble><mumble>
<g>
I'm not a database person myself; but since totcoll_by_speci is declared as
a Long, can't you just add zero to the !TotCollectedBySpecie term and avoid
the Null problem?
totcoll_by_speci = 0 + !TotCollectedBySpecie
Rick
.
- Follow-Ups:
- Re: ADOrs "Invalid Use of Null"
- From: Jeff Johnson
- Re: ADOrs "Invalid Use of Null"
- References:
- ADOrs "Invalid Use of Null"
- From: jamesfreddyc
- RE: ADOrs "Invalid Use of Null"
- From: jamesfreddyc
- Re: ADOrs "Invalid Use of Null"
- From: Saga
- ADOrs "Invalid Use of Null"
- Prev by Date: Re: Display file properties from VB?
- Next by Date: Password Randomization Web Service / App
- Previous by thread: Re: ADOrs "Invalid Use of Null"
- Next by thread: Re: ADOrs "Invalid Use of Null"
- Index(es):
Loading