Click here to Skip to main content
15,891,951 members
Home / Discussions / C#
   

C#

 
GeneralRe: annoying null problems Pin
Judah Gabriel Himango26-Oct-06 5:10
sponsorJudah Gabriel Himango26-Oct-06 5:10 
GeneralRe: annoying null problems Pin
gus_br26-Oct-06 6:09
gus_br26-Oct-06 6:09 
AnswerRe: annoying null problems Pin
Guffa26-Oct-06 7:24
Guffa26-Oct-06 7:24 
GeneralRe: annoying null problems Pin
tcss26-Oct-06 19:23
tcss26-Oct-06 19:23 
AnswerRe: annoying null problems Pin
Leslie Sanford26-Oct-06 5:10
Leslie Sanford26-Oct-06 5:10 
AnswerRe: annoying null problems Pin
PlayByTheRules26-Oct-06 5:55
PlayByTheRules26-Oct-06 5:55 
GeneralRe: annoying null problems Pin
gus_br26-Oct-06 6:15
gus_br26-Oct-06 6:15 
AnswerRe: annoying null problems Pin
Keith Barrow26-Oct-06 7:01
professionalKeith Barrow26-Oct-06 7:01 
If you're using C# 2.0 you can declare DateTime as nullable with the following:

DateTime? dataTermino = null;
if(txtDataInicio.Text != "")
dataTermino = DateTime.Parse(txtDataTermino.Text);

if(dataTermino != null)
insertCommand.Parameters.Add(new SqlParameter("@DataTermino", dataTermino));

(note the "?" after DateTime)would work. If you're not using 2.0 & need to pass null date to SQL , have a look at:

http://www.c-sharpcorner.com/Code/2003/Sept/EnterNullValuesForDateTime.asp[^]

Hope this helps
QuestionVS2005 - ReferencePaths Pin
AJ12326-Oct-06 4:45
AJ12326-Oct-06 4:45 
AnswerRe: VS2005 - ReferencePaths Pin
gus_br26-Oct-06 5:00
gus_br26-Oct-06 5:00 
QuestionRichTextBox.Text is formated in HTML [modified] Pin
1010210626-Oct-06 4:23
1010210626-Oct-06 4:23 
AnswerRe: RichTextBox.Text is formated in HTML Pin
Wolf9226-Oct-06 4:27
Wolf9226-Oct-06 4:27 
AnswerRe: RichTextBox.Text is formated in HTML Pin
ednrgc26-Oct-06 4:36
ednrgc26-Oct-06 4:36 
QuestionFile is copying Pin
C-Scharbe26-Oct-06 4:20
C-Scharbe26-Oct-06 4:20 
AnswerRe: File is copying Pin
Rob Philpott26-Oct-06 4:34
Rob Philpott26-Oct-06 4:34 
GeneralRe: File is copying Pin
C-Scharbe26-Oct-06 4:40
C-Scharbe26-Oct-06 4:40 
GeneralRe: File is copying Pin
The Man from U.N.C.L.E.26-Oct-06 6:38
The Man from U.N.C.L.E.26-Oct-06 6:38 
GeneralRe: File is copying Pin
Aby Thomas Varghese26-Oct-06 8:22
Aby Thomas Varghese26-Oct-06 8:22 
GeneralRe: File is copying Pin
C-Scharbe26-Oct-06 20:16
C-Scharbe26-Oct-06 20:16 
QuestionCharacter "space" in a textbox -- same space used for upper and lower case? Pin
shultas26-Oct-06 3:53
shultas26-Oct-06 3:53 
AnswerRe: Character "space" in a textbox -- same space used for upper and lower case? Pin
shultas26-Oct-06 3:54
shultas26-Oct-06 3:54 
GeneralRe: Character "space" in a textbox -- same space used for upper and lower case? Pin
Muntyness26-Oct-06 4:06
Muntyness26-Oct-06 4:06 
GeneralRe: Character "space" in a textbox -- same space used for upper and lower case? Pin
shultas26-Oct-06 4:11
shultas26-Oct-06 4:11 
GeneralRe: Character "space" in a textbox -- same space used for upper and lower case? Pin
Pete O'Hanlon26-Oct-06 4:22
mvePete O'Hanlon26-Oct-06 4:22 
GeneralRe: Character "space" in a textbox -- same space used for upper and lower case? Pin
Eric Dahlvang26-Oct-06 5:36
Eric Dahlvang26-Oct-06 5:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.