473,395 Members | 2,436 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,395 software developers and data experts.

Data binding and DBNULL

Hello

I have an untyped DataSet that I'm binding data into my form controls.
Binding works well (ie. no this.controll.DataBindings.Add throws an
exception) but when form is shown and some fields of a current row of
the dataset are DBNNULLs I have an exception that I cannot cast DBNULL
to other types...

What can I do to avoid this exception?

--
Semper Fidelis

Adam Klobukowski
at***@gabo.pl
Nov 16 '05 #1
0 1911

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

Similar topics

12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
3
by: Thomas Coleman | last post by:
I have been playing around with 2.0 and I'm trying clarify a few things about generics and data access. I was hoping to be able to do something like this with nullable types: int? foo = null; ...
1
by: Ben Reese | last post by:
When you bind a text box to a field that contains null values the text box displays an empty string. Great! My Database field is an integer and I want an empty text box to represent a NULL...
2
by: Nice Chap | last post by:
We are experiencing problems during data binding. If the text property of the control is bound to a datacolumn, when the user clears the field and tabs out, the textbox puts the original value...
1
by: Agnes | last post by:
In my tables, there are invoicedate, as i use databinding, bind the invoicedate to the textbox, It show mm-dd-yyyy time. I need to change it into date dd-mm-yyyy only without time . how can i do...
2
by: John | last post by:
Hi I have a drop down filled with time values (13:00, 14:00... etc.) and bound to a datetime field. The problem is that when user selects a time value say "14:00" in the drop down list, it...
4
by: Hon Yuen, Ng | last post by:
Hi This is a newbie question. I've a datatable that contains null value. Sometime i need to store this data into different variables. However, error will be thrown if the data i tried to stored...
15
by: mosipenko | last post by:
I used to have a problem with DBNull, but now my issue is: System.InvalidOperationException: Invalid attempt to read when no data is present Here's my code behind: Private Sub...
9
by: =?Utf-8?B?VGVycnk=?= | last post by:
Think it is great the way that you can set up a datsource, value member, and display member for a combobox, and map a 'code' to a 'description' and back again by binding the combobox to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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...

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.