473,385 Members | 1,492 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,385 software developers and data experts.

How to check if something is Null

VB.Net 2003, Web Application

Hey there, ive looked around for ages and havnt found a straight
answer. All I want to do is find out if a field in my datatable is Null
For example
If ts.Rows(isel).Item(4) = Null Then

Do something

End if

but have no idea how to do it.. any help would be great

Jan 12 '07 #1
2 1614
If IsDbNull(ts.Rows(isel).Item(4)) Then
....
End If
"Bonzol" <Bo****@hotmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
VB.Net 2003, Web Application

Hey there, ive looked around for ages and havnt found a straight
answer. All I want to do is find out if a field in my datatable is Null
For example
If ts.Rows(isel).Item(4) = Null Then

Do something

End if

but have no idea how to do it.. any help would be great

Jan 12 '07 #2
Bonzol wrote:
All I want to do is find out if a field in my datatable is Null
If ts.Rows(isel).Item(4) = Null Then
Do something
End if
If ts.Rows(isel).Item(4) Is System.DBNull.Value Then

HTH,
Phill W.
Jan 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Travis Spencer | last post by:
Hello, I am trying to expose a C++ class to C clients using a C-compatible wrapper API. While doing so, I hit a little snag. When a C client deletes one on my classes using the provided delete...
7
by: spiros | last post by:
Hi, suppose you have the class Class1 and the main program: class Class1 { public: Class1(); ~Class1();
5
by: tthunder | last post by:
Hi @all, Perhaps some of you know my problem, but I had to start a new thread. The old one started to become very very confusing. Here clean code (which compiles well with my BCB 6.0 compiler)....
7
by: Shaldaman | last post by:
Hi Is there a property in MS Access for the following: 1) For a Command Button on a form, is there a property that can be used to determine if it has been clicked? eg: Me!button7.Clicked - I...
9
by: G Fernandes | last post by:
Hello fellow C-goers, Comparisons of pointer variables to 0 are automatically converted to comparisons to NULL (which can be represented at the bit level but something non-zero). But how...
3
by: ferg | last post by:
I have a Customer table. The table has two different CHECK constraints. Then there is the Customer details dialog, which provides the user with an UI for changing users. I have some UPDATE sql,...
25
by: pamelafluente | last post by:
Hi Guys, I have the following HTML code which is doing a GET to a page, say MyUrl.aspx : <body> <form name="form1" method="get" action="MyUrl.aspx" id="form1"> <input type="hidden"...
9
by: pamela fluente | last post by:
I want a simple method or function to check if at least one of the field in a composite object is null (nothing). For instance, if Field5 is null I would like that a function such as ...
3
by: Helen Wheels | last post by:
Can we use parentheses in a check constraint in MS-SQL-server DDL? e.g. I'm having a problem with the following statement: ALTER TABLE . ADD CONSTRAINT CHECK (( IS NULL AND IS NULL) OR (...
14
by: Mark | last post by:
Hi, I would like to check if my object has been deleted or not, but my program keeps crashing. Here's the simplified code (in infinite loop) delete tetromino; //if(tetromino==NULL)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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...

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.