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

Typed DataSet string and null value

hi there,
has anyone come across this?

i've a typed dataset with a table and a column of type string.
I want to insert a new row and for some reason i keep getting "Null" in my
dataset.

take a simple exply of person
Name:string
Comment:string
age:int
so i create a new row
PersonRow newRow = ds.PersonTable.NewPersonRow();
then i set the values
newRow.Name = "brian";
newRow.Age = 29;
newRow.Comment = null;
newRow.SetCommentNull();

ds.PersonTable.Add(newRow);

......BUT it has added the string "Null" to my row not the Value null

Can anyone explain this? or offer a solution?

thanks in advance

Nov 17 '05 #1
1 1662
My database containted the "Null" dough!

"Brian Keating" wrote:
hi there,
has anyone come across this?

i've a typed dataset with a table and a column of type string.
I want to insert a new row and for some reason i keep getting "Null" in my
dataset.

take a simple exply of person
Name:string
Comment:string
age:int
so i create a new row
PersonRow newRow = ds.PersonTable.NewPersonRow();
then i set the values
newRow.Name = "brian";
newRow.Age = 29;
newRow.Comment = null;
newRow.SetCommentNull();

ds.PersonTable.Add(newRow);

.....BUT it has added the string "Null" to my row not the Value null

Can anyone explain this? or offer a solution?

thanks in advance

Nov 17 '05 #2

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

Similar topics

2
by: Vaap | last post by:
I am trying to get dataset working through IDbDataAdapter interface as my solution need to work with Sql Server and Oracle ODP. I am using different data provider factories and the code here only...
5
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...
6
by: Kiran | last post by:
Hi, I am using typed dataset for Employees Table and found a problem, can anyone tell me what's wrong Case 1: Employees Table: ID: int,Not Null,Idendity, Primary col Name:varchar(20),Not...
1
by: Li Weng | last post by:
Hi, I just installed Visual Studio 2005. In VS 2003, if a field's NullValue in a data table is set to -1, I can assign it -1 in code as NULL value. But in VS 2005, look like the data table...
0
by: Mateusz [PEYN] Adamus | last post by:
Hi I have a Typed DataSet. I've databinded it to some text controls on my form, controls show data when I show record. But now I would like to create a new record with this form, controls...
7
by: Bob | last post by:
Hi, I have a typed unbound dataset that is passed to a datahandling class to be filled. The datahandling class fills it from a sproc using an oledbDataAdapter (SQLAnywhere database) The only...
5
by: John | last post by:
Hi, I am developing a windows app using C# 2005. This app uses SQL Server or Oracle database depending on the what the user is using. Can I create one typed dataset and use it for SQL Server and...
5
by: =?Utf-8?B?UlBhcmtlcg==?= | last post by:
I used the wizard to generate a typed dataset for my table and let it create my SPROCs. It created everything, and the GetData() method and the custom GetByUserName query works great, but when I...
0
by: =?Utf-8?B?UGFvbG8=?= | last post by:
Using a typed Dataset. From debugging I can see that each dataset.<tableis filled with the correct data (see ###) cmbxPayee DisplayMember, ValueMember and DataSource each show the expected...
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:
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
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.