473,385 Members | 1,375 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 read null values from sqlserver in c#?

I have a table named client_master in sqlserver and i have a windows application in c#.In c# application, there are three forms.

One is to enter Client details.
Second is to update the existing clients and last one is to delete the clients.

The problem is, when i try to get all the details on my client updation form it will show only some values rather than showing the all values which are there in the database for the same client.

The reason is there are some fields which contain null values so when datareader read the null value it will direclty jump in the catch section and display "can't read null values". But I want as much information is there, all information should be there on the form, no matter if any field contains null values.
Nov 19 '10 #1
0 1250

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

Similar topics

0
by: FossiL | last post by:
Hi! I wrote a PEAR:SOAP webservice reading data out of a database and returning it in form of a struct to a C#-client. The problem is, that C# can't read NULL values for datatypes like INT,...
26
by: Agoston Bejo | last post by:
I want to enforce such a constraint on a column that would ensure that the values be all unique, but this wouldn't apply to NULL values. (I.e. there may be more than one NULL value in the column.)...
3
by: John | last post by:
I've read several prior posts in this group about using nz() to convert null values to zero; however, I'm not sure how/where to implement this function in my crosstab query. The crosstab query...
20
by: Max Sandman | last post by:
I'm getting increasingly frustrated with C# and its exceptions on null values. Rather than try to deal with it on a hit-or-miss basis as exceptions pop up, I thought I should try to learn exactly...
6
by: Markus Eßmayr | last post by:
Hello, I'd like to consume a WebService, which returns an array of objects which include several members of type System.String, System.Decimal and System.DateTime. In the WSDL-file, the members...
2
by: John S | last post by:
Does anyone know why the dataset blows up when it is reading a column that is defined at DateTime and there are null values or empty strings?
1
by: Ranjan as usual | last post by:
Dear folks, I have a column of data in MS SQL that is being read by my VB .net program. There are a couple of blank/NULL data in those columns. How do I read that data as NULL in VB .net and then...
2
by: Niron kag | last post by:
Hello ! In c# , I am reading values from text files , when I try to get the value from the text file and nothing is written there (Null - I think) , I get Error message {"Index was outside the...
2
ak1dnar
by: ak1dnar | last post by:
Hi all, I am getting this error in my ASP.net App, when reading some records which contains Null values for some of the columns. System.Data.SqlTypes.SqlNullValueException: Data is Null....
10
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have the following three files. 1. Users.aspx is a webpage that uses the <asp:ObjectDataSourcecontrol to populate a simple <asp:ListBoxcontrol. 2. The UserDetails.cs file creates a Namespace...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.