Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
Questionc# modem communication Pin
Anil Ch19-Oct-05 23:51
Anil Ch19-Oct-05 23:51 
AnswerRe: c# modem communication Pin
javad asadi17-Jan-12 18:35
javad asadi17-Jan-12 18:35 
QuestionDBNull.Value to string Pin
Brendan Vogt19-Oct-05 23:43
Brendan Vogt19-Oct-05 23:43 
AnswerRe: DBNull.Value to string Pin
ZainAMJ20-Oct-05 0:11
ZainAMJ20-Oct-05 0:11 
GeneralRe: DBNull.Value to string Pin
Brendan Vogt20-Oct-05 0:40
Brendan Vogt20-Oct-05 0:40 
GeneralRe: DBNull.Value to string Pin
ZainAMJ20-Oct-05 0:48
ZainAMJ20-Oct-05 0:48 
GeneralRe: DBNull.Value to string Pin
Brendan Vogt20-Oct-05 1:06
Brendan Vogt20-Oct-05 1:06 
GeneralRe: DBNull.Value to string Pin
ZainAMJ20-Oct-05 17:07
ZainAMJ20-Oct-05 17:07 
objCustomer.StartDate = Globals.CheckDateForDBNulls(Convert.ToDateTime(objDr["StartDate"]));

Instead of implementing this, try this one

objCustomer.StartDate = Globals.CheckDateForDBNulls(objDr["StartDate"].ToString());

==========

In your static function try this

public static DateTime CheckDateForDBNulls(String dtCheckDate)
{
if(Convert.IsDBNull(dtCheckDate) && IsDate(dtCheckDate)==true)
return System.Date.MinValue;
else
return Convert.ToDateTime(dtCheckDate);
}

AMJ (With "Z" Factor)
GeneralRe: DBNull.Value to string (Error In That Code) Pin
ZainAMJ20-Oct-05 17:10
ZainAMJ20-Oct-05 17:10 
AnswerRe: DBNull.Value to string Pin
Guffa20-Oct-05 1:31
Guffa20-Oct-05 1:31 
QuestionString conversion to DBNull.Value Pin
Brendan Vogt19-Oct-05 23:35
Brendan Vogt19-Oct-05 23:35 
AnswerRe: String conversion to DBNull.Value Pin
Dead Skin Mask20-Oct-05 0:13
Dead Skin Mask20-Oct-05 0:13 
GeneralRe: String conversion to DBNull.Value Pin
Brendan Vogt20-Oct-05 0:40
Brendan Vogt20-Oct-05 0:40 
GeneralRe: String conversion to DBNull.Value Pin
Dead Skin Mask20-Oct-05 1:28
Dead Skin Mask20-Oct-05 1:28 
GeneralRe: String conversion to DBNull.Value Pin
Brendan Vogt20-Oct-05 2:16
Brendan Vogt20-Oct-05 2:16 
QuestionAudioVideoPlayback: Video as texture. Unable to Dispose() Pin
Pixinger7719-Oct-05 23:15
Pixinger7719-Oct-05 23:15 
QuestionXML File encryption Pin
rmedo19-Oct-05 22:49
rmedo19-Oct-05 22:49 
AnswerRe: XML File encryption Pin
Guffa19-Oct-05 23:35
Guffa19-Oct-05 23:35 
GeneralRe: XML File encryption Pin
rmedo23-Oct-05 2:03
rmedo23-Oct-05 2:03 
GeneralRe: XML File encryption Pin
Guffa24-Oct-05 21:24
Guffa24-Oct-05 21:24 
GeneralRe: XML File encryption Pin
rmedo24-Oct-05 22:53
rmedo24-Oct-05 22:53 
QuestionRegarding Resolving IP Address Pin
A.Grover19-Oct-05 21:19
A.Grover19-Oct-05 21:19 
AnswerRe: Regarding Resolving IP Address Pin
leppie19-Oct-05 22:38
leppie19-Oct-05 22:38 
GeneralRe: Regarding Resolving IP Address Pin
A.Grover19-Oct-05 23:03
A.Grover19-Oct-05 23:03 
GeneralRe: Regarding Resolving IP Address Pin
S. Senthil Kumar19-Oct-05 23:21
S. Senthil Kumar19-Oct-05 23:21 

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.