473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dealing with NULL values in a recordset

Can anyone tell me if this is correct code? I have to deal with an occasional NULL value in MarketPrice. I am cycling through a recordset created by an SQL

If IsNull(rst!MarketPrice) Then....
Dec 6 '06 #1
3 10967
ADezii
8,834 Expert 8TB
Can anyone tell me if this is correct code? I have to deal with an occasional NULL value in MarketPrice. I am cycling through a recordset created by an SQL

If IsNull(rst!MarketPrice) Then....
'The syntax looks correct from my end.
Dec 6 '06 #2
NeoPa
32,556 Expert Mod 16PB
That's all good.
However, in some circumstances (not all) it's better to use the function Nz() when dealing with fields which may contain Null.
Dec 6 '06 #3
Thanks for the help!
Dec 7 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Marcus | last post by:
Hello, quick question about MySQL storing NULL values... Say I have a textbox called $_POST and a variable $var. if(empty($_POST)) $var = NULL; else $var = $_POST; Disregarding...
26
by: Agoston Bejo | last post by:
I want to enforce such a constraint on a column that would ensure that the values be all unique, but this wouldn't apply to NULL values. (I.e. there may be more than one NULL value in the column.)...
2
by: Bob C. | last post by:
Question: Why would I not be able to import an Access 97 table in which some records have null values in fields that allow null values? Wouldn't the table's design be imported first, bringing...
6
by: scott | last post by:
i've come across a real head-hurter. I'm looping through a recordset and response.writing it's rows out with no problem except 1 field. The field type is varchar and contains words like meeting,...
8
by: manning_news | last post by:
Using SQL2000. According to Books Online, the avg aggregrate function ignores null values. ((3+3+3+3+Null)/5) predictably returns Null. Is there a function to ignore the Null entry, adjust the...
1
by: Ken | last post by:
I wrote a function to use in queries that takes a date and adds or subtracts a certain length time and then returns the new value. There are times when my function needs to return Null values. ...
3
by: JOEP | last post by:
What do I need to do to allow an append query to post null values to records in a field of the destination table? Basically I want to allow records with null values to post to the table. The append...
6
by: Modest Marsupial | last post by:
What is the DAO method of allowing a recordset to have null values? Thanks, marie
20
by: Max Sandman | last post by:
I'm getting increasingly frustrated with C# and its exceptions on null values. Rather than try to deal with it on a hit-or-miss basis as exceptions pop up, I thought I should try to learn exactly...
6
by: abbylee26 | last post by:
Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData This will work when comparing other fields...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.