473,804 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I validate null data now that isnull has gone?

I am using Visual Basic.NET 2002 and ADO.NET and am a newbie after using
VB4/5/6 for ages.

I am used to vb6 where we had the isnull() function to check if something
was null so that something could be done about it.

Example:
text1.text=iif( not isnull(rs.field s(0)) , rs.fields(0), 0)
Hence:
Text1 is given the value of rs.fields(0) if it is not null, otherwise it
is populated with a zero.

I am importing data from another MDB file which unfortunately has null
entries in it, being both string and integer fields.
I have to assume that I have no means of getting to the source database to
edit it with MSAccess and therefore need to validate it at the point of
entry into the program.

I have tried to use not null, not nothing, and various other syntaxes and
have not come to any succesful conclusion.

Can anyone come up with the method I should employ to get around this
please...

Thanks in advance.

Terry
Jul 21 '05 #1
1 1401
Anon,

IsDBNull
http://msdn.microsoft.com/library/de...afctisnull.asp

Although you are not using ADO.NET you are using ADODB what is not a Net
framework part.

I hope this helps?

Cor
Jul 21 '05 #2

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

Similar topics

14
11125
by: wk6pack | last post by:
Hi, I'm getting this error on my asp page intermittently. One day it is fine, another day, it crashes a lot. I have searched the web and microsoft on this and they say it is a recordset assigned to a session variable. I dont assign any record sets to session variables in my code. I assign values to the session variables though. The place it seems to crash is Set AccessConn = Server.CreateObject("ADODB.Connection")
2
6003
by: Chris | last post by:
I have tableA, defined as: field1 varchar2(10), field2 varchar2(10), field3 varchar2(10) I have host variables defined as: v1 pic x(10) varying v2 pic x(10) varying
7
3899
by: Clifford Heath | last post by:
I have a case where a table has two candidate primary keys, but either (but not both) may be NULL. I don't want to store a copy of the concatenated ISNULL'ed fields as an additional column, though that would work if necessary. Instead, I tried the following (this is a related simplified example, not my real one): CREATE FUNCTION ApplyActionPK( @IP int = NULL, @DNS varchar(64) = NULL
15
4829
by: simonmarkjones | last post by:
I want to validate my form using a BeforeUpdate event. However now that i call my code with a beforeupdate it wont let me go to next or previous records. What code should i put in o allow me to do thi??
5
4892
by: Susan Bricker | last post by:
Hi. I'm back again with another brain-buster (for me). I am getting "Invalid use of Null" with an error number of 94 for the following ... 1. Form based on a table (tblPeople) 2. The people record contains name (firstname, lastname, middle initial, name suffix) fields, address fields (addressline1, addressline2, city, state, zipcode, country), and some other fields (email address, phone number, various on/off switches to indicate...
10
11498
by: John | last post by:
Ok. I'm not sure whether this is cool or perverted, I need second opinion ;) I define two classes as follows: /********************************************/ public sealed class Dummy { private Dummy(){} } public struct tInt {
2
3998
by: Stuart | last post by:
Hi there I have a stored procedure on my SQL database that retrieves a wide range of values from about 5 different tables. My end point is to calculate the cost against each line of retrieved data. Depending upon the contents of a particular field that cost calculation changes.... I retrieve the data in to a dataset and subsequently in to a datatable - fine so far...
1
313
by: anon | last post by:
I am using Visual Basic.NET 2002 and ADO.NET and am a newbie after using VB4/5/6 for ages. I am used to vb6 where we had the isnull() function to check if something was null so that something could be done about it. Example: text1.text=iif(not isnull(rs.fields(0)) , rs.fields(0), 0) Hence: Text1 is given the value of rs.fields(0) if it is not null, otherwise it
2
4438
by: ILCSP | last post by:
Hello, I'm in the process of changing our 'normal' Access 2000 update queries to Update Pass Through Queries. We have a SQL server 2000 database and we're using an Access 2000 database as our front end. In the criteria of one of our update query fields, we use both the isnull(field1) and Not IsNull(field2) then Field3, otherwise, set the updated field as null. Here's my converted Pass Through Query : UPDATE Vsel SET VSel.Cert1 =...
0
9594
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10347
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7635
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3832
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.