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

Table Adapters / Null Values

Hi.

I have a table adapter and one of the column s is a DateTime field. The
underlying table allows for nulls and this is reflected in the properties
for this column in the table adapter. However, I need to use an insert
function and set the value to a null.

I have tried using myTableAdaper.MyColumnName = DBNull.value;
( does not allow a cast from null to date time )

And also using plain old 'null'.

How can i set the value of this column to a null. basically, If the user
does not fill in the date field, then I want the value to be null.

Jun 27 '08 #1
0 1449

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

Similar topics

1
by: Dan Caron | last post by:
I have to create a stored procedure to purge "x" # of records from a table. I have two tables (script below): Schedule ScheduleHistory I need to purge records out of ScheduleHistory. The...
14
by: serge | last post by:
I have a scenario where two tables are in a One-to-Many relationship and I need to move the data from the Many table to the One table so that it becomes a One-to-One relationship. I need to...
1
by: JH | last post by:
I have a comma delimited file and I want to export it to an MS access table already designed with appropriate field names. How do I do this programmatically using VB.NET or C#? Thanks for any...
1
by: Michel Walsh | last post by:
Hi, Just get my hand on "Data Binding Windows Forms 2.0 Programming Smart Client Data Applications with .Net", by Brian Noyes (Addison Wesley), with a nice illustration on using generated...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
1
by: Matik | last post by:
Hey, First, sorry if this post appear twice, because, I can not find my post recently send, trying to post it once again. I'm out of ideas, so, I thought, will search help here again :( I'm...
9
by: Oonz | last post by:
Hi Friends, How can we insert records in sorted order like consider a table No Name Phone 1 test1 12345 1 test1 23455 2 test2 68638
3
by: Microsoft Newsserver | last post by:
Hi im using 2005/asp.net 2.0 I have added a query on one of my table adapters getDataByIssueID( @IssueID ) ....... sql query select * from issues where (IssueID = @IssueID) or...
13
by: ramprakashjava | last post by:
hi, i hav "java.lang.NullPointerException" error while Deleting table records using checkbox in jsp here i enclosed files help quickly plzzz.. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: 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
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...

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.