Click here to Skip to main content
15,919,479 members
Home / Discussions / Database
   

Database

 
GeneralRe: Stored Proc StartValue and EndValue Pin
_Damian S_2-Aug-07 1:58
professional_Damian S_2-Aug-07 1:58 
QuestionHelp me Pin
maram20001-Aug-07 13:56
maram20001-Aug-07 13:56 
AnswerRe: Help me Pin
Christian Graus1-Aug-07 14:55
protectorChristian Graus1-Aug-07 14:55 
AnswerRe: Help me Pin
Paul Conrad1-Aug-07 16:36
professionalPaul Conrad1-Aug-07 16:36 
QuestionConvert to Stored Proc [modified] Pin
ASPnoob1-Aug-07 10:44
ASPnoob1-Aug-07 10:44 
AnswerRe: Convert to Stored Proc Pin
Mike Dimmick1-Aug-07 11:42
Mike Dimmick1-Aug-07 11:42 
QuestionHandling null values with SqlDataReader Pin
eggie51-Aug-07 7:24
eggie51-Aug-07 7:24 
AnswerRe: Handling null values with SqlDataReader Pin
Pete O'Hanlon1-Aug-07 9:05
mvePete O'Hanlon1-Aug-07 9:05 
I tend to use a set of wrappers to handle these. For instance:
public static string GetValue(IDataReader reader, string columnName)
{
   int pos = reader.GetOrdinal(columnName);
   if (reader.IsDBNull(pos))
      return string.Empty;
   return reader.GetString(columnName).Trim();
}
This would make your code easier to maintain because you could do:
c.Notes = Utility.GetValue(reader, "Notes");


Deja View - the feeling that you've seen this post before.

AnswerRe: Handling null values with SqlDataReader Pin
Pete O'Hanlon1-Aug-07 9:31
mvePete O'Hanlon1-Aug-07 9:31 
GeneralRe: Handling null values with SqlDataReader Pin
eggie51-Aug-07 18:46
eggie51-Aug-07 18:46 
AnswerRe: Handling null values with SqlDataReader Pin
Mike Dimmick1-Aug-07 11:48
Mike Dimmick1-Aug-07 11:48 
GeneralRe: Handling null values with SqlDataReader Pin
Pete O'Hanlon2-Aug-07 10:02
mvePete O'Hanlon2-Aug-07 10:02 
Questionsql 2005 not installing [modified] Pin
costavo1-Aug-07 2:35
costavo1-Aug-07 2:35 
AnswerRe: sql 2005 not installing Pin
originSH1-Aug-07 2:47
originSH1-Aug-07 2:47 
QuestionSQL 2000 & 2005 Pin
Saranya B1-Aug-07 1:39
Saranya B1-Aug-07 1:39 
AnswerRe: SQL 2000 & 2005 Pin
kubben1-Aug-07 2:13
kubben1-Aug-07 2:13 
Questionauto run a query in ms sqlserver Pin
asdf17531-Aug-07 1:19
asdf17531-Aug-07 1:19 
AnswerRe: auto run a query in ms sqlserver Pin
Pete O'Hanlon1-Aug-07 2:21
mvePete O'Hanlon1-Aug-07 2:21 
QuestionBenefits of Access 2007 Pin
Jason Stamp31-Jul-07 23:23
Jason Stamp31-Jul-07 23:23 
AnswerRe: Benefits of Access 2007 Pin
Aaron VanWieren1-Aug-07 4:24
Aaron VanWieren1-Aug-07 4:24 
QuestionCreating Stored Proc in Text Editor [modified] Pin
ASPnoob31-Jul-07 21:17
ASPnoob31-Jul-07 21:17 
AnswerRe: Creating Stored Proc in Text Editor Pin
originSH31-Jul-07 22:10
originSH31-Jul-07 22:10 
QuestionNested Select statement Pin
Prakash_Mishra31-Jul-07 20:34
Prakash_Mishra31-Jul-07 20:34 
AnswerRe: Nested Select statement Pin
kubben1-Aug-07 2:18
kubben1-Aug-07 2:18 
GeneralRe: Nested Select statement Pin
Prakash_Mishra1-Aug-07 3:05
Prakash_Mishra1-Aug-07 3:05 

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.