Check fot null-values in a find/filter of an ADO-recorset

Check fot null-values in a find/filter of an ADO-recorset

Post by boh.. » Thu, 25 Mar 1999 04:00:00



Quote:> I want to find all the people that have no phone.
> But I can't use
> "phonenumber is Null" or something like that
> in a find or filter criteria of an ADO-rercordset can I???

        i'm just guessing, but would it be possible to use the LIKE operator;
"phonenumber not like '#*'" (i'm not sure of the format for like mask
strings, but that one is intended to return records where the first
character is not a number.)
 
 
 

Check fot null-values in a find/filter of an ADO-recorset

Post by Mart » Fri, 26 Mar 1999 04:00:00


I want to find all the people that have no phone.
But I can't use
"phonenumber is Null" or something like that
in a find or filter criteria of an ADO-rercordset can I???

Thanks
M. Remmen
QuadriX? System Design
Eindhoven
The Netherlands

 
 
 

Check fot null-values in a find/filter of an ADO-recorset

Post by Mart » Fri, 26 Mar 1999 04:00:00


That was just an example...
It's about detecting Null values (that means undefined values) for a field
of a database.
So I think you didn't get the question.
Thanx anyway

M. Remmen
QuadriX? System Design
Eindhoven
The Netherlands


Quote:>> I want to find all the people that have no phone.
>> But I can't use
>> "phonenumber is Null" or something like that
>> in a find or filter criteria of an ADO-rercordset can I???

> i'm just guessing, but would it be possible to use the LIKE operator;
>"phonenumber not like '#*'" (i'm not sure of the format for like mask
>strings, but that one is intended to return records where the first
>character is not a number.)

 
 
 

Check fot null-values in a find/filter of an ADO-recorset

Post by Joe » Fri, 26 Mar 1999 04:00:00



Quote:> I want to find all the people that have no phone.
> But I can't use
> "phonenumber is Null" or something like that
> in a find or filter criteria of an ADO-rercordset can I???

This again? Are DAOish things like IIf and & (forced string concatenation)
allowed in ADO?

--

WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!

 
 
 

Check fot null-values in a find/filter of an ADO-recorset

Post by Andy Robinso » Sat, 27 Mar 1999 04:00:00


If you are using commands in the data environment and your *Database
Provider* supports a method of checking for nulls, then you can include this
in your SQL query, even though the query editor doesn't like it.  For
example, if you are using a Jet provider with ADO:

SELECT * FROM Customers WHERE IsNull(PhoneNumber)

I guess the same would apply programmatically.

Cheers

Andy


>> I want to find all the people that have no phone.
>> But I can't use
>> "phonenumber is Null" or something like that
>> in a find or filter criteria of an ADO-rercordset can I???

!
 
 
 

1. URGENT: how to recognize NULL fields values in recorsets using javascript

Hi,
I'm developing a client/server database web application using SQL Server
2000, ADO,ASP and javascript; i'm in trouble with the following problem:
in a recordset object I've some fields that are NULL (as defined in the
SQL Server database), but after many experiments, I don't know how to do
to recognize this fields! My colleagues (they uses vbscript) with the
isNull function do that in a snap; since I'm a C++ programmer, I prefer
to use javascript both for server and client side scripting.
Here his a code snippet of one of my many experiments:

rsDirsCurrentUser.MoveFirst();
while(!rsDirsCurrentUser.EOF)
{
     if(rsDirsCurrentUser.Fields(2) != null)
     Response.Write(rsDirsCurrentUser.Fields(0)+" --- " +
rsDirsCurrentUser.Fields(2)+"<br>");
   else
     Response.Write(rsDirsCurrentUser.Fields(0)+" --- "+ "NOT ASSIGNED"
+ "<br>");
   rsDirsCurrentUser.MoveNext()

It don't work!
Any ideas?????
Many thanks,
Max

--
---------------------------------------------------------------------------------------------------
Max "Banjoman" Mazza - The blues/country man!




ICQ Number: 134157271

IRC:I use always the nick "banjoman": connect to irc.newplanetnet.net
     and search me on one of the following channels:
     #oasiblu,#dreamsworld,#radiowebnetwork or,
     at last resort, use the command /whois banjoman


Visit my home page at:
http://www.geocities.com/maxbanjoman

Coming soon: www.banjoman.it

2. $$$MAKE THOUSANDS!!! READ NOW!!

3. Check for NULL field value without returning field value

4. Oracle Web app...passing multiple parameters from a multi-select to package from html form...

5. Find in Ado Recorsets with various comparison operators

6. How to get the recordset that return from stored procedure?

7. Returning identity value when using ADO Recorset...help

8. Running Delphi application with BDE on an Oracle server

9. filter recordset for Null value

10. Filtering Null Values

11. Very simple question: Filtering out Null values

12. Null values: Classic null value problem (?)

13. Null value gets past check constraint