Click here to Skip to main content
15,889,462 members
Home / Discussions / C#
   

C#

 
AnswerRe: Foreign key Pin
whizzs26-Oct-05 8:56
whizzs26-Oct-05 8:56 
AnswerRe: Foreign key Pin
André Ziegler26-Oct-05 10:01
André Ziegler26-Oct-05 10:01 
GeneralRe: Foreign key Pin
ppp00126-Oct-05 16:51
ppp00126-Oct-05 16:51 
GeneralRe: Foreign key Pin
seee sharp26-Oct-05 18:12
seee sharp26-Oct-05 18:12 
Questiondatabase problem Pin
ppp00126-Oct-05 8:49
ppp00126-Oct-05 8:49 
AnswerRe: database problem Pin
Wjousts26-Oct-05 8:56
Wjousts26-Oct-05 8:56 
GeneralRe: database problem Pin
ppp00126-Oct-05 14:55
ppp00126-Oct-05 14:55 
GeneralRe: database problem Pin
Luis Alonso Ramos26-Oct-05 17:53
Luis Alonso Ramos26-Oct-05 17:53 
You'll get an exception. 0 is a perfectly valid value, and NULL means no value at all. So, you have to use the IsDBNull method to determine if a field is null.
int ordAge = rdr.GetOrdinal("Age");
if(!rdr.IsDBNull(ordAge))
{
    Console.WriteLine("Age: {0}", rdr.GetInt32(ordAge));
}
else
{
    Console.WriteLine("No age specified.");
}
-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!


The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
Questionfor Tom Larsen Pin
Sasuko26-Oct-05 6:01
Sasuko26-Oct-05 6:01 
AnswerRe: for Tom Larsen Pin
Tom Larsen26-Oct-05 8:23
Tom Larsen26-Oct-05 8:23 
QuestionPrinting Pin
x-trate26-Oct-05 5:51
x-trate26-Oct-05 5:51 
QuestionHow to create Dynamic menu creation in web forms using c#.net with sqlquery and dataset Pin
Anonymous26-Oct-05 5:38
Anonymous26-Oct-05 5:38 
AnswerRe: How to create Dynamic menu creation in web forms using c#.net with sqlquery and dataset Pin
Christian Graus26-Oct-05 10:51
protectorChristian Graus26-Oct-05 10:51 
QuestionSharing C# Program While Preserving Data Adapters Pin
thepolishguy26-Oct-05 5:21
thepolishguy26-Oct-05 5:21 
AnswerRe: Sharing C# Program While Preserving Data Adapters Pin
Tom Larsen26-Oct-05 8:39
Tom Larsen26-Oct-05 8:39 
QuestionWork with Processes! Pin
ventomito26-Oct-05 5:21
ventomito26-Oct-05 5:21 
AnswerRe: Work with Processes! Pin
S. Senthil Kumar26-Oct-05 5:28
S. Senthil Kumar26-Oct-05 5:28 
GeneralRe: Work with Processes! Pin
ventomito26-Oct-05 5:44
ventomito26-Oct-05 5:44 
GeneralRe: Work with Processes! Pin
Sasuko26-Oct-05 7:35
Sasuko26-Oct-05 7:35 
GeneralRe: Work with Processes! Pin
ventomito27-Oct-05 3:16
ventomito27-Oct-05 3:16 
GeneralRe: Work with Processes! Pin
Tom Larsen26-Oct-05 8:28
Tom Larsen26-Oct-05 8:28 
GeneralRe: Work with Processes! Pin
ventomito27-Oct-05 3:23
ventomito27-Oct-05 3:23 
GeneralRe: Work with Processes! Pin
Dan Neely27-Oct-05 3:51
Dan Neely27-Oct-05 3:51 
GeneralRe: Work with Processes! Pin
Dan Neely26-Oct-05 8:36
Dan Neely26-Oct-05 8:36 
QuestionXmlSerializer and custom collections with properties Pin
mav.northwind26-Oct-05 4:57
mav.northwind26-Oct-05 4:57 

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.