|
by: news.microsoft.com |
last post by:
Hello,
I have DateTime property.
How can I set this value to null?
|
by: steve gibson |
last post by:
I am trying to enter null values into a database using
DateTime values. Where the string is empty I need to null
the value in the database.
if (dataAvailActual.ToString().Trim()!=string.Empty)
r.DATE_ACTUAL= System.DateTime.Parse(dataAvailActual);
else
r.PUBLICATION_DATE_ACTUAL= null;
The compiler gives me :
|
by: Paulb1us |
last post by:
I want to set a DateTime field to Null before passing it to the DB
//First I check to see if anything is in this datarow column, because
sometimes we have no data.
DateTime dt;
if ( datarow.ToString().Length > 0)
{
//We assume the data is a date
dt = (DateTime)datarow;
}
|
by: Visual Systems AB \(Martin Arvidsson\) |
last post by:
Hi!
When reading a value from an SQL database i get to a DateTime variable...
How can i check that the there is no value assigned?
Since i cant use if(myDate.ShortDate != null) ?
Regards
|
by: Rey |
last post by:
Howdy all.
My problem deals w/inserting nulls into database (SQL Svr 2K) for the
datetime fields activityDate and followUpDate where nulls are allowed.
>From the web form, the user can type in/select the activity or followup
date.
If, for this exercise, the followupdate textfield is empty, then when
the insert method of the class calls the InsertActivityLog stored
procedure, how can I get nulls inserted instead of 1/1/1900 because of
|
|
by: Reza Solouki |
last post by:
Hello,
I have a system where it gets its data from a file that is provided
periodically. There are cases where many values such as dates are blank.
Considering DateTime variable doesn't accept null, and SQL Server doesn't
accept DateTime.MinValue...
What is the solution to deal with these kind of cases? I probably could
create some work around to send some awkword value that SQL accept and then
|
by: Jose Fernandez |
last post by:
Hello.
how can i cast a null value from a datareader (System.DBNull) to dateTime
I have an object. One of its fields is a DateTime type field. From the
database i am getting System.DBNull values from its corresponding column.
What can I do to cast it? i don't want to implement a custom method for
this.
myClass.ExpirationDate=Convert.ToDateTime(dr); // throw an
exception.
|
by: Bill Gower |
last post by:
Why won't this work? What do I need to do to make it work?
DateTime? DateMember;
if((DateTime.Parse(oldRow.ToString) == null))
DateMember = null;
else
DateMember = DateTime.Parse(oldRow.ToString());
The program is failing on the if saying that the null value in the field in
|
by: GaryDean |
last post by:
Is there any good way in which to deal with null datetimes. For instance, I
can't seem to find anything that will pass a null value in a datetime
parameter to another method. Convert.dbnull will not work for instance.
Getting nulls back and forth between C# and SQL Server is always
problematic.
--
Regards,
Gary Blakely
|
by: Brad Pears |
last post by:
I am using vb.net 2005 and SQL server 2000. In my table I have a date field
of type "smalldatetime". In my vb application, the user may or may not enter
a date value into the appropriate text box. I then want to pass the value of
this text box as a datetime variable to my stored procedure which inserts or
updates the row.
As I mentioned above, the textbox may be left blank - hence I would want to
pass a null to the stored proc. How do I...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|