473,396 Members | 1,757 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.

VS2003 Nullable DataSet/DataTable Columns


Hi,

I have a row in a dataset table which is nullable ( and also on the sql
backend ), but how can I set it to a null.

if I try Myrow.myDate = nothing

when I test the row, I get "#12:00AM" wh

?? IDEAS ??

--
Goofy
Jan 2 '07 #1
3 1494
Goofy wrote:
I have a row in a dataset table which is nullable ( and also on the sql
backend ), but how can I set it to a null.

if I try Myrow.myDate = nothing
I'd use

Myrow.myDate = System.DBNull.Value
when I test the row, I get "#12:00AM" wh
That's just VB's /attempt/ to display a null Date to you in a
"meaningful" way - midnight, "Day Zero".

HTH,
Phill W.
Jan 2 '07 #2
Thanks Phil
"Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-kwrote in message
news:en**********@south.jnrs.ja.net...
Goofy wrote:
>I have a row in a dataset table which is nullable ( and also on the sql
backend ), but how can I set it to a null.

if I try Myrow.myDate = nothing

I'd use

Myrow.myDate = System.DBNull.Value
>when I test the row, I get "#12:00AM" wh

That's just VB's /attempt/ to display a null Date to you in a "meaningful"
way - midnight, "Day Zero".

HTH,
Phill W.

Jan 2 '07 #3

Actually Phil, this doesent work on V1.x
I have to use a method of the datarow to set it to null

MyRow.SetMyColumnToNull


"Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-kwrote in message
news:en**********@south.jnrs.ja.net...
Goofy wrote:
>I have a row in a dataset table which is nullable ( and also on the sql
backend ), but how can I set it to a null.

if I try Myrow.myDate = nothing

I'd use

Myrow.myDate = System.DBNull.Value
>when I test the row, I get "#12:00AM" wh

That's just VB's /attempt/ to display a null Date to you in a "meaningful"
way - midnight, "Day Zero".

HTH,
Phill W.

Jan 2 '07 #4

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

Similar topics

3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
1
by: cindy | last post by:
Get data into datatable, add to dataset dsSearch " Get data into datatable, add to dataset dsSearch Using In-Memory SQL Engine join the tables and select the filenames from the join, add to...
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
3
by: Datatable Dataset Datagrid help | last post by:
Hi I am somewhat confused, I am new at VB.net I use XML data, I have a datagrid, I created a datatable so that I can create a custom format like true is this graphic false is this graphic and...
10
by: dauphian | last post by:
Hello, I am new to .net and am trying to build a report application that queries 4 different tables based on a id, and I need to return them in the same table for easy viewing. Basically, I...
5
by: GG | last post by:
I am trying to add a nullable datetime column to a datatable fails. I am getting exception DataSet does not support System.Nullable<>. None of these works dtSearchFromData.Columns.Add( new...
1
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then...
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
12
by: Brian | last post by:
I want to create an In Memory dataset. not connected to any database.. but putting my own info in from code or a file.... What are the steps to do this? Where can I find some info on how to do...
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:
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: 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
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.