|
-
Feb 14th, 2025, 05:02 AM
#22
Thread Starter
PowerPoster
Re: MS Access, Text Fields and Null.
 Originally Posted by Arnoutdv
I don't understand what you are referring to:
Code:
If IsNull(rsDataSet.Fields(0)) Then
txtWhatever.Text = ""
Else
txtWhatever.Text = rsDataSet.Fields(0)
End If
This won't suddenly crash. It's clean and it's obvious how the special case IsNull is handled.
If you have multiple columns in table which are allowed to be NULL then you have to deal with this in your code.
I really don't see the problem.
No. I meant stuff I've already written that I forgot to check. Nothing wrong with the code you posted. That's how to prevent the crashing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|