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

Allow nulls

Hi

How to get information from DataSet, allows the field NULL values or not?

If i fill DataSet and read
"MyDataSet.Tables("table").Columns("name").AllowDB Null"
then this returns always True
Regards;
Meelis
Mar 20 '06 #1
3 1828

"Meelis Lilbok" <me***********@deltmar.ee> wrote in message
news:eu**************@TK2MSFTNGP11.phx.gbl...
Hi

How to get information from DataSet, allows the field NULL values or not?

If i fill DataSet and read
"MyDataSet.Tables("table").Columns("name").AllowDB Null"
then this returns always True
Regards;
Meelis

How are you loading the schema for the data? are you filling this from a
sql database or some fashion like that? I think the problem is that no
schema is loaded so it doesn't know if AllowDBNull is true or false based on
the source table.
Mar 20 '06 #2
Hi James

This "schema" thing is unknown for me :))

Im filling dataset from SQL database and then try to get DataType like this
MyDataSet.Tables("table").Columns("name").AllowDBN ull
Meelis

"James Jardine" <ja***********@geoage.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

"Meelis Lilbok" <me***********@deltmar.ee> wrote in message
news:eu**************@TK2MSFTNGP11.phx.gbl...
Hi

How to get information from DataSet, allows the field NULL values or not?

If i fill DataSet and read
"MyDataSet.Tables("table").Columns("name").AllowDB Null"
then this returns always True
Regards;
Meelis

How are you loading the schema for the data? are you filling this from a
sql database or some fashion like that? I think the problem is that no
schema is loaded so it doesn't know if AllowDBNull is true or false based
on the source table.

Mar 21 '06 #3

"Meelis Lilbok" <me***********@deltmar.ee> wrote in message
news:Om**************@TK2MSFTNGP10.phx.gbl...
Hi James

This "schema" thing is unknown for me :))

Im filling dataset from SQL database and then try to get DataType like
this
MyDataSet.Tables("table").Columns("name").AllowDBN ull
Meelis

"James Jardine" <ja***********@geoage.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

"Meelis Lilbok" <me***********@deltmar.ee> wrote in message
news:eu**************@TK2MSFTNGP11.phx.gbl...
Hi

How to get information from DataSet, allows the field NULL values or
not?

If i fill DataSet and read
"MyDataSet.Tables("table").Columns("name").AllowDB Null"
then this returns always True
Regards;
Meelis

How are you loading the schema for the data? are you filling this from a
sql database or some fashion like that? I think the problem is that no
schema is loaded so it doesn't know if AllowDBNull is true or false based
on the source table.



You have to call the FillSchema method of your dataadapter before you call
your .Fill. This will fetch the allowDbNull information from the database.
Of course.. this increases the number of trips to the database but if you
need the information this is how you get it.
http://msdn2.microsoft.com/en-US/lib...y5(VS.80).aspx this link is
to 2005 but it is the same concept as 2003 and 2002.
Mar 21 '06 #4

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

Similar topics

3
by: aaj | last post by:
Hi I am probably going to regret asking this because I'm sure you are going to tell me my design is bad 8-) ah well we all have to learn.... anyway I often use Nulls as a marker to see if...
3
by: Trevor Best | last post by:
Is there a *simple* way to change a collumn from allowing null to not null? I just unchecked "allow nulls" in EM and the SQL it generates to do this one thing is astonishing, create table, drop...
5
by: Robert Stearns | last post by:
Either I missed something, or ALTER TABLE does not have this capability. Is there any way of doing it except DROPping all constraints which mention this table, EXPORTing the data, DROPping the...
0
by: Rhino | last post by:
I am working with SQL Functions in DB2 for Windows/Linux/UNIX (V8.2.1) and am having a problem setting input parameters for SQL Functions to null in the Development Center. My simple function,...
1
by: PST | last post by:
Here's a problem I'm trying to deal with: I'm working on a Frontpage 2000 website for a boat handicapping system, built in Access 97. What I'm trying to accomplish is: The user enters a...
8
by: Mike | last post by:
The current databas structure that i'm working with allowed NULL's an now I'm converting the app to .NET and it will not allow NULLs in the fields when populated. So my question is, how can i...
0
by: Steve Amey | last post by:
Hi all I am having a problem when I am updating my database. I am using a strong DS and the PK column is an Identity column, but when I am udating my database I am getting the exception 'Column...
0
by: Scott_from_Carematic | last post by:
I'm trying to use a strongly typed dataset in my asp.net (2.0) project with visual studio 2005. I have generated the dataset and tableadapters in the designer. I'm using SQL server EE 2005 as the...
3
by: binder | last post by:
I am designing a new table with a few columns that may or may not have a value on each row that is inserted. What issues determine whether to allow a NULL value to be inserted for that column or...
5
by: John | last post by:
Hi I have a vb.net winform data app with sql server 2005 backend. The ID field in the tblClients table is an 'int' identity column that does not allow nulls. The problem is that when I try to...
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: 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
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...
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...

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.