CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.faq_frequently_asked_questions Tags:
Item Type: NewsGroup Date Entered: 5/30/2007 5:37:29 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 43 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
sthauttam
Asp.Net User
exception handling5/30/2007 5:37:29 PM

0/0

 

Hey guys could you please help me? I have a code like this

while(reader.Read())

{

  id=reader.GetInt32(0);  

  name=reader.GetString(1);

}

If the data is empty in the database it throws exception , so I want to  handle the exception and also if the corresponding data are not in the database, how can I display blank in the textbox?

I would appreciate your help.

 Thanks,

 

XIII
Asp.Net User
Re: exception handling5/30/2007 5:43:32 PM

0/0

Hi,

you could first check for

if(reader.HasRows)

and then act accordingly.

Grz, Kris.


Kris van der Mast [MVP] || 101 LINQ to SQL samples
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Learning Python Authors: Mark Lutz, Pages: 700, Published: 2007
C++ how to Program: How to Program Authors: Paul J. Deitel, Pages: 1429, Published: 2008
Recent Advances in Parallel Virtual Machine and Message Passing Interface: 10th European PVM/MPI User's Group Meeting, Venice, Italy, September 29-October 2, 2003 : Proceedings Authors: J. J. Dongarra, Domenico Laforenza, Salvatore Orlando, Pages: 693, Published: 2003
Object-oriented Technology: ECOOP 2000 Workshop Reader : ECOOP 2000 Workshops, Panels, and Posters, Sophia Antipolis and Cannes, France, June 12-16, 2000 : Proceedings Authors: Jacques Malenfant, Sabine Moisan, Ana M. D. Moreira, Pages: 308, Published: 2000
Exception Handling. Authors: F Cristian, Research Division, International Business Machines Corporation, Pages: 0, Published: 1987
Java in a Nutshell Authors: David Flanagan, Pages: 1254, Published: 2005
Introduction to Java Programming: Brief Version Authors: Y. Daniel Liang, Pages: 705, Published: 2008
JavaScript: The Definitive Guide Authors: David Flanagan, Pages: 916, Published: 2002
C# Cookbook Authors: Jay Hilyard, Stephen Teilhet, Pages: 1154, Published: 2006
Struts: The Complete Reference Authors: James Holmes, Pages: 800, Published: 2006

Web:
Exception handling - Wikipedia, the free encyclopedia Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of a condition that changes the ...
Exception Handling in Software Development Feb 20, 2008 ... Exception handling I have encountered developers who say “I know this isn’t the right way to do things, but this is an exception” to explain ...
Best Practices for Exception Handling | O'Reilly Media Java exceptions, if used the right way, can be very useful. Gunjan Doshi discusses the right ways to deal with them.
Lesson: Exceptions (The Java™ Tutorials > Essential Classes) Catching and Handling Exceptions ... An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions. ...
java.net: Three Rules for Effective Exception Handling How to use exceptions to build better Java applications: be specific, throw early, and catch later.
Exception Handling Some programmers simply consider them too intricate and make do with traditional error handling techniques. What is your experience with exception handling? ...
Error and Exception Handling Note for Windows developers: unfortunately, the native exception-handling used by most Windows compilers actually throws an exception when you use assert() ...
C++ Exception Handling Introduces the concept of exception handling for handling program errors.
java.net: Exception-Handling Antipatterns Tim McCune looks at the antipatterns--bad solutions to common problems--found in exception handling code. If you've wondered whether to catch, log, ...
Exception Handling in NetUI Declarative exception handling is a powerful feature offered by NetUI. It allows you to define handling for expected and unexpected exceptions without ...

Videos:
Kevin Frei @ NWCPP: Exception Handling Cost Kevin Frei - Exception Hanlding Cost September 2006 meeting of the Northwest C++ Users Group. Discussion of the assembly language cost of exception ...
Lecture - 23 Processor Design Exception Handling Lecture Series on Computer Architecture by Prof. Anshul Kumar, Department of Computer Science & Engineering ,IIT Delhi. For more details on NPTEL vis...
Tutorial: Exception handling in JAVA A presentation how to handle exceptions in JAVA or other object-oriented programming languages
Java Video Tutorial 9: Exceptions The basics of exception handling. Sorry for the delay (Of 7 months...).
Dan Ingalls: Object-Oriented Programming Lecture about OOP given by Smalltalk Developer Even in our days, where object-oriented programming is widely accepted, it is still not very well und...
Teach Yourself Extended BASIC 7 CHAPTER 7. Exception Handling. ON BREAK, ON ERROR, ON WARNING, CALL ERR, RETURN texintreasures.com
Second Look - Spiral Island map editor Second look at the map editor I am creating to assist with the creation of Spiral Island, an XNA title I am working on to be released on XBOX Live Co...
soc 25 system level test bench .corner case . boundary conditions .error conditions . exception handling
012-Important Note for PL/SQL to remember (Oracle Training) Basic information about PL/SQL you must know before doing any hands-on. PL/SQL is a language that was provided by Oracle. Stored procedure is a colle...
GCCINSTALL #24 Installing the GNU Compiler Collection http://gcc.gnu.org/install/ : namespace is required for an entire build. This problem can be avoided in a number of ways. With ...




Search This Site:










how to sort data into gridview

why i cannot run the proramme after uploaded to server

strange behavior with calendar binding

asp.net 2.0 - website configuration management from iis

firefox prompt password

cultureinfo, currentculture, currentuiculture stuff

stored procedure

where is the asp.net documentation?

changing items on homepage after every page refresh

dispose of an object

viewstate

loading database rows in ienumerable 3.5

web security: input validation in asp.net applications

how to navigate an event located in amaster page

how to: convert vb into c# and c# into vb

how can i create online-exam project in asp.net using c#?

visual studio 2005 sp1, asp.net ajax 1.0 rc1 and .net framework 3.0

view text size

whidbey: the new compilation model

how to set auto increment in web matrix with msde sql desktop server

website statistics

managing admin / user accounts for your web applications

new line in c# code

create a gis web application with asp.net

how do i retrieve a non-primary datakey value from a gridview?

exception handling

how to move databases between computers that are running sql server

forms authentication - redirecting users to a page other than default.aspx

preventing validation error messages from disapperaing during postback.

create folder runtime in asp.net

  Privacy | Contact Us
All Times Are GMT