473,498 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Argument 'Expression' cannot be converted to type 'DBNull'

77 New Member
Hello,
Here is the code that I have :
Expand|Select|Wrap|Line Numbers
  1.  If Not Val(dgFamilyMember.Rows(i).Cells(15).Value).Equals(Val(publicFamilyMemebrDS.Tables(0).Rows(i).Item(15).ToString)) Then
  2.                     StrFMCommet &= " FM Group: " & publicFamilyMemebrDS.Tables(0).Rows(i).Item(14).ToString & ""
  3.                     StrFMCommet &= " Changed to " & dgFamilyMember.Rows(i).Cells(14).Value & "    ***     "
  4.                     If flagClientDetailFMUpdated = False Then UpdateClientDetails("FM")
  5.                 End If
  6.  
When user removes a field's value from the datagrid and press save button. It will be check to see if data had changed. If it is changed the comment record will be added to database.
Argument 'Expression' cannot be converted to type 'DBNull'.
I get this error and I don’t know how should I handle it I have the same code for 50 other fields.
Aug 14 '08 #1
1 5404
Plater
7,872 Recognized Expert Expert
Are you sure that is the correct line of code as pointed to by the error message?
I don't see any explicit usage of DBNull?
Aug 15 '08 #2

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

Similar topics

5
7440
by: DraguVaso | last post by:
Hi, Something I don't understand about a Typed DataSet: When a value in the DataSet is DBNull, it throws this error: "Cannot get value because it is DBNull". But aren't Typed DataSets...
10
3630
by: John Bowman | last post by:
Hello, I need some help getting a callback delegate passed as an argument to a dynamically linked Dll method so it in turn, can eventually call it. Below is the salient portions of code I'm...
14
6679
by: Dan | last post by:
Is it just me, or is the removal of support for the word "void" in a parameter list extremely annoying? Some of us have been programming for years putting "void function_name (void)" - and it...
9
4143
by: HS1 | last post by:
Hello Could you please help for a simple boolean expression If a is not equal to Null I tried If (a != null) Then
7
12918
by: Tizzah | last post by:
What is wrong with that? regex = /^(http|https):\/\/+({1}+)*\.{2,5}(({1,5})?\/.*)?$/ if(field.hpage.value != regex.test(field.hpage.value)){ alert("Bad Homepage") field.hpage.focus()...
11
1970
by: vbgunz | last post by:
Hello all, I am just learning Python and have come across something I feel might be a bug. Please enlightenment me... The following code presents a challenge. How in the world do you provide an...
5
2985
by: shaanxxx | last post by:
i have statements printf("%f",(double)1); /* works fine although i have sent %f for double */ printf("%c",(int)64); /* works fine although i have sent %c for int */ Need your comment on...
7
8118
by: bowlderster | last post by:
Hello,all. I want to get the array size in a function, and the array is an argument of the function. I try the following code. /*************************************** */ #include<stdio.h>...
30
2648
by: Angel Tsankov | last post by:
Hello! Does the C++ standard define what happens when the size argument of void* operator new(size_t size) cannot represent the total number of bytes to be allocated? For example: struct S {...
0
6993
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
7197
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...
0
7375
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...
1
4899
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...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1411
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 ...
0
287
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...

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.