Click here to Skip to main content
15,899,313 members
Home / Discussions / C#
   

C#

 
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 
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 
Hi,

I tried the following function, but it doesn't want to work:

//*********************************************************************
//
// CheckStringForDBNulls Static Method
//
// The CheckStringForDBNulls method checks if a string contains a value, if not it
// returns DBNull.Value, or the value of the string.
//
//*********************************************************************

public static DBNull CheckStringForDBNulls(string strCheckString)
{
if(strCheckString.Trim() != string.Empty)
return strCheckString.Trim();
else
return DBNull.Value;
}

Could you please let me know what I am doing wrong? This is used to check the parameter being added, if it contains nothing, the make the value DBNull.Value, or use the value of thr string.

Thanks
BRENDAN

-- modified at 5:46 Thursday 20th October, 2005
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 
GeneralRe: Regarding Resolving IP Address Pin
A.Grover20-Oct-05 0:25
A.Grover20-Oct-05 0:25 
GeneralRe: Regarding Resolving IP Address Pin
leppie20-Oct-05 2:59
leppie20-Oct-05 2:59 
GeneralRe: Regarding Resolving IP Address Pin
Dave Kreskowiak20-Oct-05 3:14
mveDave Kreskowiak20-Oct-05 3:14 

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.